Is hypergeometricPFQ somewhere public available?
Is the hypergeometricPFQ method also already available for calls from outside apfloat library?
- https://github.com/mtommila/apfloat/blob/6e3088cd70dcc873e6df004f9646702570f24626/apfloat/src/main/java/org/apfloat/HypergeometricHelper.java#L447
HypergeometricHelper is package private.
No.
I don't know any algorithm to calculate the case p = q + 1 when |z| >= 1. (All the interesting cases are of this type e.g. 3F2 or 7F6.)
If you can point me to an algorithm, I will consider it.
I don't know how Mathematica calculates it.
The hypergeometricPFQ() function in HypergeometricHelper does not converge when p = q + 1 and |z| >= 1 so calling it may just hang. With |z| close to 1 but less than 1 it may converge arbitrarily slowly. So I don't recommend calling it and I don't plan to add it to the public API.
Did you already checked these references?
- https://github.com/fredrik-johansson/arb/blob/master/acb_hypgeom/pfq.c
In mpmath they simply lists the restrictions for using the hyper() function. Maybe you can do it similarly:
- https://mpmath.org/doc/current/functions/hypergeometric.html
- https://github.com/mpmath/mpmath/blob/master/mpmath/functions/hypergeometric.py#L195
I was able to find formulas for calculating some cases but not all.
- https://functions.wolfram.com/HypergeometricFunctions/HypergeometricPFQ/06/01/05/02/0004/ when |z| ≫ 1
- Analytic continuation when |z| ≈ 1 but not when z is close to 1
- https://functions.wolfram.com/HypergeometricFunctions/HypergeometricPFQ/06/01/04/01/0002/ when z is 1 or close to 1 but only when Re(ai) > 0
I was planning on making a release now but if I wait until hypergeometricPFQ() is implemented it might take another several years.
Ok, no problem. Go ahead and make a release.
Another note is that also other types of pFq than p = q + 1 will converge very slowly and take practically forever to calculate when |z| is very large. A generic approach for this would be needed as well. For example 1F2(z) when |z| ≫ 1.