Trait polylog::Li

source ·
pub trait Li<T> {
    // Required method
    fn li(&self, n: i32) -> T;
}
Expand description

Provides the n-th order polylogarithm function li() of a number of type T.

Required Methods§

source

fn li(&self, n: i32) -> T

Implementations on Foreign Types§

source§

impl Li<f64> for f64

source§

fn li(&self, n: i32) -> f64

Returns the real n-th order polylogarithm of a real number of type f64 for all integers n.

The implementation for n < 0 is an adaptation of [arxiv:2010.09860].

Example:
use polylog::Li;

let z = 1.0;
let n = 10;
println!("Li({},{}) = {}", n, z, z.li(n));
source§

impl Li<Complex<f64>> for Complex<f64>

source§

fn li(&self, n: i32) -> Complex<f64>

Returns the complex n-th order polylogarithm of a complex number of type Complex<f64> for all integers n.

The implementation for n < 0 is an adaptation of [arxiv:2010.09860].

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

let z = Complex::new(1.0, 1.0);
let n = 10;
println!("Li({},{}) = {}", n, z, z.li(n));

Implementors§