Closed Shimuuar closed 8 years ago
Plot for \a → incompleteBeta a a (0.5+δ) - incompleteBeta a a (0.5-δ)
. E.g. gap size
Note sudden drop to 0 at a=10
Turns out is due to loss of precision in logBeta for p < 10 && q < 10
. It uses logGamma which isn't very precise but itself. Replacing logGamma with logGammaL in otherwise branch of logBeta fixed problem.
Partially fixed in b4819949e5016f3cbcdc88d25556531b5c839a64 by switching to Lanczos approximation everywhere.
b4819949e5016f3cbcdc88d25556531b5c839a64 markedly improved precision of gamma function for z<1, so I think it's safe to mark this as fixed.
There's discontinuity when switching between two areas for x, Here is plot for
incompleteBeta 4.5 4.5
This of course adversely affects precision of inverse incomplete beta in area.