Karim Belabas on Sun, 23 Oct 2022 15:33:58 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: binomial coefficient with negative args
|
- To: Christian Krause <me@ckrause.org>
- Subject: Re: binomial coefficient with negative args
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Sun, 23 Oct 2022 15:32:54 +0200
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Cc: pari-users@pari.math.u-bordeaux.fr
- Delivery-date: Sun, 23 Oct 2022 15:33:58 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1666531975; bh=1T7Z2pFIOq5fT9HD8k6rL6LRup1UXQdtQWuvQkhPaoE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JhTnOgouZKVNA6naZ1lk//Qh6dr7J8ZfdTHm+YRwC3IeXZ1sf1eqFVk4Rirrq9WW0 t9C1htfiiDXTd9bcChdgx7qYgClM7r8sirCOo51l6vkF2Qnm1+POrRIXF+yZNPO4Ow ablH9AHZgF1ubkO/+XNoQ/5j3GugCSQCwM/ycFwv8B/JvrfDm5qeOIVEA84QWWRz5h zF2JWbRWlOwxNmg5oLzynJ4Q34zBWIkORgGyukJpBvDCwTCoe2rdraVdWNo3ZO1wdj 9iqAyRg+wd/wZ2n/XJAPbS/JjMXMVdAEEK1I68dgDImccXqH86Foz9ZUWqrcZj4qFd SMLihVFUoGtHf/8iw+qKQx+N5cl1LxyOjNFt65hPXLw/oeo7x/wYx53uBDkX9nNOwP ddQHOXlGwu1SYXVpR11THYgJaSDmbtm0zBRM1MzheNKwjsxNIibu8FBIorHR7zIT36 TS4KYReLp8t/HfQ6OdoP3kN4JvpalJOsSnIDWcrWQCR3JH2W4zqRc0Ilx7S/x3qcF6 w2VfjCgnqOZETLE/z6pPkIucQ4lCY0fcpAfAzWEZ8M7Krsbtf4CREK4PmY/zBz/9dL B+jj4XvJE/GWebxjH0hLDY4UisfQ/xL2MXQkX1zd97rr50TxWp6EU9iIb15Qp4Ni+D QbG9R/lSav2JTEA4F4HxtEEs=
- In-reply-to: <CAM_+VSMctVGiRLQvdH0RJVBHGi4wYRoJG7HywQWAAU=kaxyhtA@mail.gmail.com>
- Mail-followup-to: Christian Krause <me@ckrause.org>, pari-users@pari.math.u-bordeaux.fr
- References: <CAM_+VSMctVGiRLQvdH0RJVBHGi4wYRoJG7HywQWAAU=kaxyhtA@mail.gmail.com>
* Christian Krause [2022-10-22 21:46]:
> Hi,
> the binomial coefficient in GP behaves differently than I thought for
> negative arguments. For instance, binomial(-2,-4) yields 0 (zero). In
> Wolfram Alpha the result is 3. The paper by Kronenburg
> <https://arxiv.org/pdf/1105.3689.pdf> states this:
>
> [image: image.png]
>
> For binomial(-2,-4), the second case applies: (-1)^(-2+4) *
> binomial(4-1,-2+4) = binomial(3,2) = 3. This is consistent with Wolfram
> Alpha. They also document the same definition here
> <https://mathworld.wolfram.com/BinomialCoefficient.html>.
>
> Why does PARI/GP yield different results for binomial() with negative
> arguments?
The extension binomial(x, k) for negative n and k was not implemented.
Just did this in the 'master' branch following Kronenburg's extension,
updating the documentation in the process.
Please test !
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251), Université de Bordeaux
Vice-président en charge du Numérique
T: (+33) 05 40 00 29 77; http://www.math.u-bordeaux.fr/~kbelabas/
`