Skip to main content

double_exponential

Function double_exponential 

Source
pub fn double_exponential(
    f: impl Fn(f64) -> f64,
    a: f64,
    b: f64,
    n: usize,
) -> f64
Expand description

Approximate ∫ f(x) dx on [a, b] using the tanh-sinh (double exponential) transform.

Uses n quadrature points spread symmetrically about the midpoint.