search for: gnm_float

Displaying 1 result from an estimated 1 matches for "gnm_float".

2004 Apr 15
0
phyper accuracy and efficiency (PR#6772)
...example phyper(59, 150, 150, 60, FALSE, FALSE) gives 6.372680161e-14. The right answer is dhyper(0, 150, 150, 60, FALSE) which is 5.111204798e-22. phyper is also really slow for large arguments. Therefore, I suggest using the code below. This is a sniplet from Gnumeric, so you'll have to s/gnm_float/double/ and s/gnum//, etc. The code isn't perfect. In fact, if i*(NR+NB) is close to n*NR, then this code can take a while. Not longer than the old code, though. /* * New phyper implementation. Copyright 2004 Morten Welinder. * Distributed under the GNU General Public License. *...