[GiNaC-devel] [GiNaC-list] binomial coefficients

Richard B. Kreckel kreckel at in.terlu.de
Wed Feb 8 00:10:20 CET 2023


On 2/7/23 23:38, Vladimir V. Kisil wrote:
>>>>>> On Tue, 7 Feb 2023 22:18:02 +0100, Marko Riedel <riedelmo at mathematik.uni-stuttgart.de> said:
> 
>      MR> Greetings.  I would like to point out that
> 
>      MR>     binomial(-5, -7)
> 
>      MR> will produce a segmentation fault. Compare to Maple which says
>      MR> that when binomial(n,k) has k<0 but n-k>=0 we should use
>      MR> binomial(n, n-k) which gives 15 in this case.
> 
>      If we want this feature to be added to GiNaC then the attached patch
>    may do it.

Oh, I just saw your patch too late. I guess it is equivalent to the one 
I just pushed, but you're welcome to check, could you?

   -richy.



More information about the GiNaC-devel mailing list