New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance / internal needed precision of regularized incomplete beta function #359
Comments
|
This problem affects all hypergeometric functions, Bessel functions, etc. |
|
Specifically for the continued fraction expansion of the incomplete beta function with real parameters and variable, I do believe that error bounds are available, but I don't have a reference at hand. |
|
This is also interesting: https://core.ac.uk/download/pdf/187723002.pdf |
|
Since your answer I read many papers dedicated to the computation of the incomplete beta:
The 2nd one seems to say that convergence and error bound can be proven for a modified version of Mueller continued fraction expansion. |
|
More or less fixed: now prints: Still, the current algorithm breaks down for parameters larger than 1e16 or so, and is not very efficient, so there is more to do. |
Huge precision is needed to compute arb_hypgeom_beta_lower(a, b, x, 1) for medium a and b. For large a and b computation is not possible.
To compute arb_hypgeom_beta_lower(10^5, 10^5, 4999/10000, 1) with a precision of 20 digits, internal precision has to be increased up to 262144 binary digits :
beta(10^10, 10^10, 4999/10000, 1) can not be computed.
It comes from the fact that arb_hypgeom_beta_lower relies on acb_hypgeom_beta_lower which relies on generic acb_hypgeom_2f1 implementation.
Still for positive a and b there exists an algorithm based on continued fraction expansion which does not seem to need such high internal precision. I have done a quick and dirty translation in Pari/GP of the implementation found in GNU GSL and it seems to give instantaneous correct results with Pari default precision of 38 digits :
beta.zip
Larger computation can be computed as fast :
This continued fraction expansion is listed on https://functions.wolfram.com/GammaBetaErf/BetaRegularized/10/ but its validity domain is not given.
The text was updated successfully, but these errors were encountered: