The Polylogarithm Function in Julia
The polylogarithm function is one of the constellation of important mathematical functions. It has a long history, and many connections to other special functions and series, and many applications, for instance in statistical physics. However, the practical aspects of its numerical evaluation have not received the type of comprehensive treatments lavished on its siblings. Only a handful of formal publications consider the evaluation of the function, and most focus on a specific domain and/or presume arbitrary precision arithmetic will be used. And very little of the literature contains any formal validation of numerical performance. In this paper we present an algorithm for calculating polylogarithms for both complex parameter and argument and evaluate it thoroughly in comparison to the arbitrary precision implementation in Mathematica. The implementation was created in a new scientific computing language Julia, which is ideal for the purpose, but also allows us to write the code in a simple, natural manner so as to make it easy to port the implementation to other such languages.
READ FULL TEXT