[Scilab-users] [SEP] factorial() extension on [171, 10^14]

Samuel Gougeon sgougeon at free.fr
Fri May 4 16:23:43 CEST 2018


Le 04/05/2018 à 16:13, Rafael Guerra a écrit :
> Hi Samuel,
>
> How are in the proposed extension the resulting very large numbers represented?
> In other words, how are the limitations of double precision overcome and can we do math with such very large integers?
>
> PS: In Scilab the gammaln() function allows computing the logarithm of the factorial for large integers.

Hello Rafael,

Please see the link to the help page posted in my first message. It is 
documented in the page.
The algorithm can be seen on CodeReview (ref in the message/bugzilla 
entry). It uses a careful
processing with log(). It is more accurate than gammaln() by a factor of 
up to 100 (it is also
documented in the test).

Regards
Samuel




More information about the users mailing list