double Lerch(const double z, double s, double a);
Lerch transcendent function.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | z | const double | base of the geometric factor z^k; real, |z| <= 1. |
| 2 | s | double | exponent (order); real. |
| 3 | a | double | offset of the denominator; real, with a+k != 0 for k=0,1,2,.... |
Returns: an approximation to the Lerch transcendent function.
Remarks:
The Lerch transcendent is defined by the series
Phi(z,s,a) = sum_(k=0)^(inf)z^k/((a+k)^s) ,
estimated here by direct summation until the next term is below the relative tolerance 10^(-10). Terms with are skipped. Special cases: Phi(1,s,1)=zeta(s) and Phi(z,1,1)=-ln(1-z)/z.
Domain: |z| <= 1 for convergence (the series converges geometrically for |z| < 1; at z=1 convergence requires s > 1 and is slow). Defined behavior: returns the partial sum; returns NAN when any argument is NAN.
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler