You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Polylogarithm package provides C, C++ and Fortran implementations
of various polylogarithms, including the real and complex dilogarithm,
trilogarithm, and (Standard and Glaisher) Clausen functions. The
implementations have been fully tested against the literature and many
other implementations and are highly optimized for fast numerical
evaluation.
The package has no external dependencies, except for the C/C++/Fortran
standard libraries. The implementations of the individual polylogarithm
functions are distributed among different source code files, so
individual source code files can be easily extracted and incorporated
into existing projects.
Example in C++
#include"Li.hpp"
#include"Li2.hpp"
#include"Li3.hpp"
#include"Li4.hpp"
#include"Li5.hpp"
#include"Li6.hpp"
#include<iostream>intmain() {
usingnamespacepolylogarithm;constdouble x = 1.0;
const std::complex<double> z(1.0, 1.0);
// real polylogarithms for real arguments
std::cout
<< "Li_2(" << x << ") = " << Li2(x) << '\n'
<< "Li_3(" << x << ") = " << Li3(x) << '\n'
<< "Li_4(" << x << ") = " << Li4(x) << '\n';
// complex polylogarithms for complex arguments
std::cout
<< "Li_2(" << z << ") = " << Li2(z) << '\n'
<< "Li_3(" << z << ") = " << Li3(z) << '\n'
<< "Li_4(" << z << ") = " << Li4(z) << '\n'
<< "Li_5(" << z << ") = " << Li5(z) << '\n'
<< "Li_6(" << z << ") = " << Li6(z) << '\n'
<< "Li_10(" << z << ") = " << Li(10,z) << '\n';
}