BTW, I posted some FET code earlier that does just that; if there's something wrong with it, please let me know.
Trying your code with these inputs
print Fishers_Exact::fishers_exact( 989, 9400, 43300, 2400 );
I get these results:
P:\test>FET-tlm.pl 0.99999999999999999999999999999999999999999999999[... 950 9s truncated +] 9999999999999999999999999999999999999999999999999[... 950 9s truncated +] 9999999999999999999999999999999999999999999999999[... 950 9s truncated +] 9999999999999999999999999999999999999999999999999[... 950 9s truncated +] 9999999999999999999999999999999999999999999999999[... 950 9s truncated +] 9999999999999999999999999999999999999999999999999[... 950 9s truncated +] 9999999999999999999999999999999999999999999999999[... 950 9s truncated +] 99999999999999999999999999999999952665545273822897512768877675 1 trial of _default ( 1.385s total), 1.385s/trial
Now, given that your code needs Math::Pari, and the "simple" solution using that module produced the correct answer in 26ms, I can't help wonder what all that messing around with Stirling and Gosper approximations bought you?
I also think that if you are going to require exporter, you might as well let it do it's job and skip all that autoload stuff. And I personally find that littering your code with a dozen BEGIN{} blocks makes it very hard to follow.
In reply to Re^2: Algorithm for cancelling common factors between two lists of multiplicands
by BrowserUk
in thread Algorithm for cancelling common factors between two lists of multiplicands
by BrowserUk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |