Bad initial approximation for an invIncompleteBeta #13

Closed
Shimuuar opened this Issue Oct 3, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@Shimuuar
Collaborator

Shimuuar commented Oct 3, 2012

For small fraction of values initial approximation is so bad that answer couldn't be calculated at all

>>> invIncompleteBeta 0.38149949842159736 0.18477227005166014 0.4451926249819095
*** Exception: x out of [0,1] range

Initial approximation for x indeed falls out of [0,1] range and so inverse couldn't be calculated. Currently initial guess from AS64,AS109 is used. Guess from numerical recipes is free from this problem but have poor precision. Current guess require 2 iterations on average and one from recipes frequently require more than 10.

Probably we should take algorithm for initial guess from boost: http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_inv_function.html (futher references on the page)

@Shimuuar Shimuuar closed this in 9ddff7f Jan 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment