Microcebus has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
In a script, I use factorials to calculate propabilities. I calculate my propabilities with
Of course this works fine with integers, but how can I calculate foctorials of floating point numbers?$limit=1000; @factorials=(1); foreach(1..$limit) { $factorial=$factorial*$_; push(@factorials,$factorial); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Floating point factorials
by ikegami (Patriarch) on May 13, 2011 at 20:55 UTC | |
|
Re: Floating point factorials
by BrowserUk (Patriarch) on May 13, 2011 at 21:08 UTC | |
|
Re: Floating point factorials
by ww (Archbishop) on May 14, 2011 at 00:33 UTC | |
by tye (Sage) on May 14, 2011 at 16:02 UTC | |
|
Re: Floating point factorials
by Khen1950fx (Canon) on May 14, 2011 at 02:20 UTC | |
by John M. Dlugosz (Monsignor) on May 14, 2011 at 15:59 UTC |