pub struct ComplexSpecialFunctions;Expand description
Complex special functions.
Implementations§
Source§impl ComplexSpecialFunctions
impl ComplexSpecialFunctions
Sourcepub fn zeta(z: Complex, iterations: usize) -> Complex
pub fn zeta(z: Complex, iterations: usize) -> Complex
Riemann zeta function for complex arguments.
Sourcepub fn polylog(s: Complex, z: Complex, iterations: usize) -> Complex
pub fn polylog(s: Complex, z: Complex, iterations: usize) -> Complex
Polylogarithm Li_s(z).
Computed from the defining series, which converges absolutely for
|z| < 1 (and conditionally on |z| = 1 when Re(s) > 1).
For |z| > 1 the analytic continuation is not implemented (the
naive inversion series is numerically unreliable for general complex
s); NaN is returned rather than silently wrong values.
Sourcepub fn erf(z: Complex, iterations: usize) -> Complex
pub fn erf(z: Complex, iterations: usize) -> Complex
Complex error function.
Taylor series for |z| < 3; asymptotic expansion with optimal
truncation for |z| ≥ 3 (where the Taylor series needs hundreds of
terms to converge).
Sourcepub fn erfc(z: Complex, iterations: usize) -> Complex
pub fn erfc(z: Complex, iterations: usize) -> Complex
Complex complementary error function.
Uses the direct asymptotic form for large |z| so that erfc does
not suffer catastrophic cancellation inside 1 − erf(z).
Sourcepub fn exponential_integral(z: Complex, iterations: usize) -> Complex
pub fn exponential_integral(z: Complex, iterations: usize) -> Complex
Complex exponential integral Ei(z).
Sourcepub fn fresnel(z: Complex, iterations: usize) -> (Complex, Complex)
pub fn fresnel(z: Complex, iterations: usize) -> (Complex, Complex)
Complex Fresnel integrals C(z) and S(z).
Convention without π/2 factors: C(z) = Σ (-1)^n z^(4n+1)/((2n)! (4n+1)), S(z) = Σ (-1)^n z^(4n+3)/((2n+1)! (4n+3)).
Sourcepub fn airy(z: Complex, iterations: usize) -> (Complex, Complex)
pub fn airy(z: Complex, iterations: usize) -> (Complex, Complex)
Complex Airy functions Ai(z) and Bi(z).
Ai(z) = c1·f(z) - c2·g(z), Bi(z) = √3·(c1·f(z) + c2·g(z)) with f(z) = Σ z^(3k)/(9^k k! Γ(k+2/3)), g(z) = Σ z^(3k+1)/(9^k k! Γ(k+4/3)), c1 = 3^(-2/3), c2 = 3^(-4/3).