There was no particular reason why I hadn’t added that code already. This was easy to implement - the only complication is that integer parameters result in singular gamma factors, but the mechanisms to handle those automatically were already in place. > cplot(lambda z: hyp3f2(2.5,3,4,1,2.25,z),, ,Ī bit of theoretical background: the hypergeometric series pF q has an infinite radius of convergence when p ≤ q, so it can in principle be evaluated then by adding sufficiently many terms at sufficiently high precision (although in practice asymptotic expansions must be used for large arguments, as mpmath does). Plot(lambda x: hyp3f2(1,2,3,4,5,exp(2*pi*j*x)), )Ī numerical value of 5F 4 with z on the unit circle, with general complex parameters: Unfortunately, the implementation is still not perfect, but I decided to commit the existing code since it is quite useful already (and long overdue).Īs proof of operation, I deliver plots of 3F 2 and 4F 3, requiring both |z| 1:į2 = lambda z: hyper(,z)Ī portrait of 3F 2 restricted to the unit circle: This addition means that the generalized hypergeometric function is finally supported essentially everywhere where it is “well-posed” (in the sense that the series has nonzero radius of convergence), so it is a rather significant improvement. Previously 2F 1 (the Gaussian hypergeometric function) was supported - see earlier blog posts - but not 3F 2 and higher. blog / Analytic continuation of 3F2, 4F3 and higher functionsĪs of a recent commit, mpmath can evaluate the analytic continuation of the generalized hypergeometric function p+1F p for any p.
0 Comments
Leave a Reply. |