I finally got around to add the tests. Updates pushed to github now. (Here<http://www.gnu.org/software/gsl/manual/html_node/Factorials.html>says that GSL_SF_FACT_NMAX is 170 instead of 100).
Best, Maggie On Wed, Oct 31, 2012 at 4:14 PM, Maggie X <[email protected]> wrote: > Got it. I'll see if I can get it in. Thanks! > > > On Wed, Oct 31, 2012 at 3:42 PM, David Mertens > <[email protected]>wrote: > >> I can work on some tests in a few days, though I'm busy at the moment. >> >> There should be two tests: one set that tests would be compare the >> results of the factorial form and the Stirling form where they are in good >> numerical agreement, basically for 50 < x < 100, and ensure that they agree >> within bit noise (by one measure or another). >> >> The second set of tests are to ensure that the code for the combined form >> (called pmf_poisson) gives results that are *identical* to those of the >> factorial form for x < 50, and the Stirling form for x > 100. >> >> David >> >> >> >> On Wed, Oct 31, 2012 at 2:28 PM, Maggie X <[email protected]> wrote: >> >>> Thanks for the update, David! Would you mind adding a couple test cases? >>> I'd be happy to add it too if you can suggest some numbers to test. >>> >>> Best, >>> Maggie >>> >>> On Wed, Oct 31, 2012 at 12:38 PM, David Mertens < >>> [email protected]> wrote: >>> >>>> Maggie (and other Stats PDLers) - >>>> >>>> I ran into some numerical stability issues with the Poisson probability >>>> mass function. The Poisson distribution is mathematically well-behaved, but >>>> is not numerically stable. Fortunately, I was able to use Stirling's >>>> approximation to increase the range of accuracy and the allowed input range >>>> to effectively work for anything. >>>> >>>> I've issued a pull request. You can check it out and comment here: >>>> https://github.com/maggiexyz/PDL-Stats/pull/1 >>>> >>>> David >>>> >>>> P. S. Maggie's recent switch to Github didn't spur my interest in >>>> PDL::Stats (blame my research for that), but it sure made it a heck of a >>>> lot easier for me to manage this proposed modification. :-) >>>> >>>> -- >>>> "Debugging is twice as hard as writing the code in the first place. >>>> Therefore, if you write the code as cleverly as possible, you are, >>>> by definition, not smart enough to debug it." -- Brian Kernighan >>>> >>>> >>> >> >> >> -- >> "Debugging is twice as hard as writing the code in the first place. >> Therefore, if you write the code as cleverly as possible, you are, >> by definition, not smart enough to debug it." -- Brian Kernighan >> >> >
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
