Bad initial approximation for an invIncompleteBeta #13

Shimuuar opened this Issue Oct 3, 2012 · 0 comments


None yet
1 participant

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: (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