Hello,
I need to evaluate the Gauss Hypergeometric functions _2F_1(a,b;c;z). Here are some specifications for the arguments of this function
a has compex values. The real part is \sim2 (and is strictly positive), while the complex part ranges from 0 to \sim500
b has compex values. The real part ranges from 10 to \sim5000, while the complex part ranges from 0 to \sim500
c is a real number, which ranges from 10 to 5000
z is a real number, which ranges from 0 to 1.
Which packages should I consider to evaluate _2F_1, given the previous requirements? I have found some existing packages, such as HypergeometricFunctions.jl or Nemo.jl, but I don’t know which one is the most stable/efficient given my requirements. I could also consider to call the mpmath module.
I also add that I value stability and precision, rather then speed. I could evaluate the hypergeometric functions for a fixed grid of a, b, c and z and then I could store the output.
If requested, I can give more details on the numerical integrals I am trying to solve.
Specialfunctions.jl would be the first package I would look at, but it seems it does not support hypergeometric functions although the name would fit.
The next thing would probably be searching on Juliahub.
Hypergeometricfunctions.jl shows up first, but there is also StatsFuns and the Distributions package.
HypergeometricFunctions.jl looks tike the package to use, but opening an issue for SpecialFunctions.jl might also be a good idea.
Hi @marcobonici, HypergeometricFunctions.jl is a package based on
N. Michel and M. V. Stoitsov, Fast computation of the Gauss hypergeometric function with all its parameters complex with application to the Pöschl–Teller–Ginocchio potential wave functions, Comp. Phys. Commun., 178:535–551, 2008;
J. W. Pearson, S. Olver and M. A. Porter, Numerical methods for the computation of the confluent and Gauss hypergeometric functions, Numer. Algor., 74:821–866, 2017; and,
research on rational approximation algorithms that is not yet published.
The repository is not rigorous, but designed to be generic & flexible in the Julia-sense. (As a general comment, the parameter regime you’re interested in is problematic for stability and efficiency.)
If timing is no issue when creating your tables, you can always iterate over the precision until you are satisfied.
Nemo will be rigorous and do what you want. It calls into Arb, which is developed by @Fredrik_Johansson (also the author of mpmath). He might have more insight into the efficiency for your parameter range.