Skip to content
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

Numerical instability of pFq((1, 1, 1), (2, 2), x) in HypergeometricFunctions 0.3.17 #65

Open
Expander opened this issue Jun 24, 2023 · 1 comment

Comments

@Expander
Copy link

Dear HypergeometricFunctions developers,

I was comparing the function x*pFq((1, 1, 1), (2, 2), x) with the dilogarithm and noticed multiple numerical instabilities in version 0.3.17.

To reproduce:

using HypergeometricFunctions, Plots

dilog(x) = real(x * pFq((1, 1, 1), (2, 2), x))

plot(range(-1e3, 1e4, length = 1000), dilog)

Please find the output plot below. The shown function has multiple (pseudo-)poles, which should not be there (the real part of the dilogarithm is continuous for arguments greater than 1).

dilog

@MikaelSlevinsky
Copy link
Collaborator

Evaluating a {q+1}F_q right on the branch cut (1, infinity) would require something different: right now, the code uses rational approximations that place the poles on the branch cut, so convergence there is quite tricky (and honestly unexpected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants