implement polylog for arbitrarily large arguments.
See original GitHub issueWe’ve been running into an issue over at PlasmaPy, where when we try to use polylog
to calculate the Fermi Integral we hit an implementation error:
import numpy as np
import mpmath
mpmath.polylog(1 + 0.5, -np.exp(3.89))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/anaconda3/lib/python3.6/site-packages/mpmath/ctx_mp_python.py", line 1016, in f_wrapped
retval = f(ctx, *args, **kwargs)
File "/home/user/anaconda3/lib/python3.6/site-packages/mpmath/functions/zeta.py", line 482, in polylog
return polylog_general(ctx, s, z)
File "/home/user/anaconda3/lib/python3.6/site-packages/mpmath/functions/zeta.py", line 449, in polylog_general
raise NotImplementedError("polylog for arbitrary s and z")
NotImplementedError: polylog for arbitrary s and z
Would it be possible to implement polylog
for large arguments? For our purposes it is fine to restrict it to an index of 1.5 for now.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
implement polylog for arbitrarily large arguments. #390
We've been running into an issue over at PlasmaPy, where when we try to use polylog to calculate the Fermi Integral we hit...
Read more >Polylogarithm
In mathematics, the polylogarithm is a special function Lis(z) of order s and argument z. ... arbitrary complex order s and for all...
Read more >The Computation of Polylogarithms
The polylogarithm function, Lip(z), is defined, and a number of algorithms are derived for its computation, valid in different ranges of its real...
Read more >Zeta functions, L-series and polylogarithms
The reflection formula for ℜ(s)<0 is implemented in some cases. ... zetazero() supports arbitrarily large n and arbitrary precision: > ...
Read more >[2010.09860] The Polylogarithm Function in Julia
In this paper we present an algorithm for calculating polylogarithms for both complex parameter and argument and evaluate it thoroughly in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can this help? https://arxiv.org/abs/1809.07084 Ordinary polylogarithms are a particular case of harmonic polylogarithms. And this paper provides a method to reduce (analytically) polylogarithms of any real argument to combinations of polylogarithms of arguments between 0 and $\sqrt{2}-1$. At least up to weight 8.
Yes, it would be possible. The decomposition in terms of the Hurwitz zeta function could be used for this. Here is code that should work at least in your case:
Beware that there could be some ranges where this formula loses precision.