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

mpmath ascribes a value to divergent Lerch Phi series. #676

Open
kspalaiologos opened this issue Mar 30, 2023 · 4 comments
Open

mpmath ascribes a value to divergent Lerch Phi series. #676

kspalaiologos opened this issue Mar 30, 2023 · 4 comments
Labels
Milestone

Comments

@kspalaiologos
Copy link

kspalaiologos commented Mar 30, 2023

To quote some code from the mpmath implementation:

    if z == 0:
        return a ** (-s)
    # Faster, but these cases are useful for testing right now
    if z == 1:
        return ctx.zeta(s, a)
    if a == 1:
        return ctx.polylog(s, z) / z

it is apparent that Re(s)>1 condition is not checked. As such, per Wolfram, lerchphi(1,0.5,1) is complex infinity, while mpmath outputs the following:

>>> lerchphi(1, 0.5, 1)
mpf('-1.4603545088095868')
@skirpichev skirpichev self-assigned this Apr 21, 2023
@fredrik-johansson
Copy link
Collaborator

This corresponds to the usual analytic continuation of the Riemann zeta function. Is there a strong reason to disallow such input?

@skirpichev
Copy link
Collaborator

This corresponds to the usual analytic continuation of the Riemann zeta function.

@fredrik-johansson, are you sure? According to the DLMF 25.14.2 - it's not: zeta(s, a) could be used only for certain conditions. Ditto for the polylog in the next if case.

@fredrik-johansson
Copy link
Collaborator

It says that the identity should hold when those conditions are met. It doesn't say that the same identity can't hold when those conditions aren't met.

It's just a matter of convention how you define analytic continuations of functions of several variables; the question is what convention is more useful here.

@kspalaiologos
Copy link
Author

kspalaiologos commented May 8, 2023

Could we at least have this behaviour explicitly mentioned in the documentation then, if it is indeed intended?
I have previously filed a similar issue regarding the Zeta function crashing for arguments in which it should not have been evaluated: #653

@skirpichev skirpichev added this to the next-release milestone Nov 27, 2023
@skirpichev skirpichev removed their assignment Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants