I have an input set that needs to call the hypergeom function 137544 timesHow many different $m, $n, $N, $m+$n-$N, $i, $n-$i, $m+$i-$N, $N-$i, $m+$n do you have? What happens if you cache the result of logfact? And how big is your $m+$n? Can't you just precalculate k! for 1 <= k <= $m+$n and then use a lookup in the webapplication? Then your calculation just becomes 9 lookups, 7 bignum additions and 1 bignum division.
In reply to Re: Fast hypergeometric calculation in Perl
by JavaFan
in thread Fast hypergeometric calculation in Perl
by mrguy123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |