twolodzko / extraDistr

Additional univariate and multivariate distributions
51 stars 11 forks source link

When possible, use more numerically stable implementations #10

Closed twolodzko closed 6 years ago

twolodzko commented 6 years ago

Issues like #9 can happen also in other cases, more numerically stable implementations need to be used.

twolodzko commented 6 years ago

Changes can be compared here: https://github.com/twolodzko/extraDistr/compare/76b7f68940db98ba59e1bd7897bcb646c9a15d27...c3426b56290799ccb0f36ddd9f34f115aa484977

The accompanying tests can be found in tests/testthat/test-pure-r-benchmarks.R that compare the "naive" R implementations with numerically stable implementations in C++.

twolodzko commented 6 years ago

Zero inflated distributions were also changed: 5c024c5bd3d98e15e244e8907d10fe46c9e64117