22 Mar
2010
22 Mar
'10
8:39 p.m.
Hi, Silvestre Abruzzo wrote:
binomial(n, n-(i+1))=binomial(n, i)* (n-i)/(i+1)
I tried to implement the multiplication by storing the result of of (n-i)/(i+1) in one cl_RA number, but unfortunately the performance are worst than the direct calculation.
It should be faster if you write it as (binomial(n, i) * (n-i)) / (i+1) The multiplication is a multiplication of integers, and the division can be written as an 'exquo' call. Bruno