JensGrabner / mpmath-2

Automatically exported from code.google.com/p/mpmath
Other
3 stars 0 forks source link

lerch phi evaluated as nan #211

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In mpmath as shipped currently with sympy (i.e. 0.17):

In [1]: mpmath.lerchphi(1.0000000, 4.1+1j, 1.0)
Out[1]: (nan + nanj)

In [2]: mpmath.lerchphi(1.00000001, 4.1+1j, 1.0)
Out[2]: (1.04978614989967 - 0.0531909196466606j)

In [3]: mpmath.zeta(4.1+1j, 1.0)
Out[3]: (1.04978614939285 - 0.0531909188369103j)

The first is the problem, the second shows that the evaluation bug seems to be 
confined to z exactly unity. Since lerchphi reduces to hurwitz zeta for z=1, 
the third is the desired output.

Original issue reported on code.google.com by ness...@googlemail.com on 21 Jul 2011 at 9:45

GoogleCodeExporter commented 9 years ago
Thanks for the bug report. I just re-enabled use of zeta and polylog, which 
should fix this.

Original comment by fredrik....@gmail.com on 22 Jul 2011 at 9:16