Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/expander/polylogarithm
Implementation of polylogarithms in C/C++/Fortran
https://github.com/expander/polylogarithm
c cplusplus cpp fortran math mit-license polylogarithm special-functions
Last synced: 11 days ago
JSON representation
Implementation of polylogarithms in C/C++/Fortran
- Host: GitHub
- URL: https://github.com/expander/polylogarithm
- Owner: Expander
- License: mit
- Created: 2015-09-11T13:54:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-27T12:46:38.000Z (12 days ago)
- Last Synced: 2024-10-27T14:23:13.911Z (12 days ago)
- Topics: c, cplusplus, cpp, fortran, math, mit-license, polylogarithm, special-functions
- Language: C++
- Homepage:
- Size: 10.3 MB
- Stars: 33
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
Polylogarithm
=============[![Build Status](https://github.com/Expander/polylogarithm/workflows/test/badge.svg)](https://github.com/Expander/polylogarithm/actions)
[![Coverage Status](https://coveralls.io/repos/github/Expander/polylogarithm/badge.svg)](https://coveralls.io/github/Expander/polylogarithm)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++
--------------```.cpp
#include "Li.hpp"
#include "Li2.hpp"
#include "Li3.hpp"
#include "Li4.hpp"
#include "Li5.hpp"
#include "Li6.hpp"
#includeint main() {
using namespace polylogarithm;const double x = 1.0;
const std::complex 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';
}
```Output:
```
Li_2(1) = 1.64493
Li_3(1) = 1.20206
Li_4(1) = 1.08232
Li_2((1,1)) = (0.61685,1.46036)
Li_3((1,1)) = (0.871159,1.26708)
Li_4((1,1)) = (0.959319,1.13804)
Li_5((1,1)) = (0.987467,1.06844)
Li_6((1,1)) = (0.99615,1.03355)
Li_10((1,1)) = (0.999962,1.00199)
```Notes
-----The implementation of the real dilogarithm is an adaptation of
[[arXiv:2201.01678](https://arxiv.org/abs/2201.01678)].The implementation of the complex dilogarithm is inspired by the
implementation in [SPheno](https://spheno.hepforge.org/).The implementation of the real trilogarithm is an adaptation of
[[arXiv:2308.11619](https://arxiv.org/abs/2308.11619)].The implementation of the general n-th order complex polylogarithm an
adaptation of [[arXiv:2010.09860](https://arxiv.org/abs/2010.09860)].Copying
-------Polylogarithm is licenced under the MIT License.