Aleksey Khudyakov
Aleksey Khudyakov
Function could return answers which are orders of magnitude off. It could be due to the fact that we revert to bisection which is linear instead of cubic Halley. ```...
Currently initial approximations for invIncompleteBeta are huge mess. There's need to systemyze them and check. For example approximation from "Numerical Recipes" look quite similar to new one from boost.
It's required for accurate estimation of probability P(X>x) for large x for χ² and gamma distributions and consequently evaluate improbability of fit/statistical hypothesis. This report is of low priority.
We can imrove convergence and rule out some of looping behaviors during Halley iterations by bracketing root like it's done in boost,
``` >>> incompleteBeta 100 100 0.000453582882551019090765914709706407847988884896039962768554688 0.0 ``` but true answer is: 2.00541346834439406004294904703959964191892215724246345240369e-276
``` *Numeric.SpecFunctions.Internal> invIncompleteBeta 9 2 1e-300 *** Exception: Numeric.SpecFunctions.incompletBeta_: x out of [0,1] range. p=9.0 q=2.0 x=NaN ``` It fails in Halley step when derivative of incomplete beta underflows and...
There are basically two way to deal with invalid input. First is to throw exception on invalid input and second is to return NaN. Both methods have advantages and disadvantages....
They fail intermittently probably due to rounding. We need understand why does they fail and how to write good tests
All functions in the package should be represented in the benchmark suite. Currently only few are