polylog: z to positive infinity should return nan#1034
Conversation
skirpichev
left a comment
There was a problem hiding this comment.
LGTM as a quick fix.
But I think that a correct answer should be rather -inf+nanj (see mentioned identity).
BTW, WolframEngine 14.3 shows -Infinity even for PolyLog[1,Infinity].
| if n < 0: | ||
| return z*0 | ||
| if ctx._is_real_type(z) and ctx.isinf(z) and n > 0: | ||
| if ctx._is_real_type(z) and ctx.isinf(z) and n > 0 and z < 0: |
There was a problem hiding this comment.
Looking on
https://functions.wolfram.com/ZetaFunctionsandPolylogarithms/PolyLog/17/02/01/01/0008/
I would say it should have -inf as real part for z > 0.
I agree. Happily the unit test added here would still be acceptable b/c |
That's why I not asked you to remove/rewrite tests. |
Fixes #1033.