Bill Allombert on Mon, 28 Nov 2022 14:43:21 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: binomial() challenge (+thanks) |
On Mon, Nov 28, 2022 at 12:58:57PM +0100, Ruud H.G. van Tol wrote: > > On 2022-11-26 19:09, Bill Allombert wrote: > > On Sat, Nov 26, 2022 at 01:17:28PM +0100, Ruud H.G. van Tol wrote: > > > > > > PARI binomial() challenge: > > > > > > binom_1(n,k) = gamma(n+1) / gamma(k+1) / gamma(n-k+1) > > > binom_2(n,k) = exp(lngamma(n+1) - lngamma(k+1) - lngamma(n-k+1)) > > Ah! You had a one-time-in-a-life opportunity to use the factorial() function > > and you blew it! > Heheh, I use factorials all the time, > for stuff like this: > https://en.wikipedia.org/wiki/Factorial_number_system I am not speaking about the factorials, but about the little-known factorial() GP function! Cheers, Bill