Bill Allombert on Sat, 26 Nov 2022 19:37:31 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: binomial() challenge (+thanks)


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!

Cheers,
Bill