[Scilab-users] Computing with very large numbers in Scilab
Rafael Guerra
jrafaelbguerra at hotmail.com
Thu Jan 1 19:16:22 CET 2015
Calixte and Bruno,
Thanks for the mathematical insight, and especially for the gammaln
function, very good to know.
For a general case, do we need to use Scilab's Multiple Precision Arithmetic
Toolbox?
(which does not seem to work for 64-bits version)
Thanks again and regards,
Rafael G.
-----Original Message-----
From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Calixte
Denizet
Sent: Thursday, January 01, 2015 5:05 PM
To: users at lists.scilab.org
Subject: Re: [Scilab-users] Computing with very large numbers in Scilab
Hi Rafael,
You could use the function gammaln:
1-exp(gammaln(365 + 1)-(gammaln(365 - 23 + 1) + 23*log(365)))
Regards,
Calixte
On 01/01/2015 17:08, Rafael Guerra wrote:
> Dear Scilab'ers,
>
> Happy New Year.
> Does someone know to perform in Scilab computations involving very
> large numbers?
> For example, the how to compute the following probability formula:
> 1-365!/((365-23)! *365^23)
>
> 1-factorial(365)/(factorial(365-23)* 365^23) produces Nan in Scilab
> The correct answer (using Wolfram Alpha) is: 0.507...
>
> Thanks and regards
> Rafael G.
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
--
Calixte Denizet
Software Development Engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
http://www.scilab-enterprises.com
_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
More information about the users
mailing list