http://qs1969.pair.com?node_id=466578


in reply to Re^3: Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?
in thread Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?

S'neat, but you do loose quite a bit more accuracy than with Math::Pari

Math::BigInt 19937! = 2.174930234150431374566653562e77066 time: 104.69 +734287262 Math::Pari 19937! = 2.174930234150431374566653166e77066 time: 0.00 +255584716 ^ PP::LogFact 19937! = 2.174930232142160900000000000e77066 (time: 0.03 +0866) ^

Once you start doing further math with them, those inaccuracies add up fast.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
  • Comment on Re^4: Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?
  • Download Code