In my code i want to solve the Fermi-Dirac-Integral numerically. This can be achieved with a Polylogarithm.
Actually I'm coding in C#
, so my function to calculate this polylogarithm looks like that:
public double PolyLog(double s, double z)
{
double sum = 0;
for (int k = 0; k < 1e5; k++)
sum += Math.Pow(z, k) / Math.Pow(k, s);
return sum;
}
This actually does it's job pretty well for values |z| < 1
.
However, I need to calculate the polylogarithm also for values that are bigger than 1.
Is there any code, that calculates polylogarithms for |z|>1?
Probably this would be done by any kind of analytic continuation.
Although, I'm using C#
, I don't care about the language. I can easily translate any code to C#
.