Re: [GiNaC-devel] [GiNaC-list] binomial coefficients
On Tue, 7 Feb 2023 22:18:02 +0100, Marko Riedel <riedelmo@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. -- Vladimir V. Kisil http://www1.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Maps https://doi.org/10.1142/p835 Soft: Geometry of cycles http://moebinv.sourceforge.net/ Jupyter notebooks: https://github.com/vvkisil?tab=repositories
On 2/7/23 23:38, Vladimir V. Kisil wrote:
On Tue, 7 Feb 2023 22:18:02 +0100, Marko Riedel <riedelmo@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.
On Wed, 8 Feb 2023 00:10:20 +0100, "Richard B. Kreckel" <kreckel@in.terlu.de> said: RK> Oh, I just saw your patch too late. I guess it is equivalent to RK> the one I just pushed, but you're welcome to check, could you?
Yes, indeed. -- Vladimir V. Kisil http://www1.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Maps https://doi.org/10.1142/p835 Soft: Geometry of cycles http://moebinv.sourceforge.net/ Jupyter notebooks: https://github.com/vvkisil?tab=repositories
participants (2)
-
Richard B. Kreckel
-
Vladimir V. Kisil