Trait polylog::Li2

source ·
pub trait Li2<T> {
    // Required method
    fn li2(&self) -> T;
}
Expand description

Provides the 2nd order polylogarithm (dilogarithm) function li2() of a number of type T.

Required Methods§

source

fn li2(&self) -> T

Implementations on Foreign Types§

source§

impl Li2<f64> for f64

source§

fn li2(&self) -> f64

Returns the real dilogarithm of a real number of type f64.

Implemented as rational function approximation with a maximum error of 5e-17 [arXiv:2201.01678].

Example:
use polylog::Li2;

let z = 1.0;
println!("Li2({}) = {}", z, z.li2());
source§

impl Li2<Complex<f64>> for Complex<f64>

source§

fn li2(&self) -> Complex<f64>

Returns the dilogarithm of a complex number of type Complex<f64>.

This function has been translated from the SPheno package.

Example:
use num::complex::Complex;
use polylog::Li2;

let z = Complex::new(1.0, 1.0);
println!("Li2({}) = {}", z, z.li2());

Implementors§