Skip to main content

tanh_sinh

Function tanh_sinh 

Source
pub fn tanh_sinh<F>(
    f: F,
    a: &ExactNum,
    b: &ExactNum,
    p: usize,
    rm: RoundingMode,
    cc: &mut Consts,
) -> Option<ExactNum>
Expand description

Tanh–sinh (double-exponential) quadrature of f on [a, b].

x = tanh((π/2) sinh t), step h = 2π / (p ln 2) then up to TANH_SINH_LEVELS_MAX successive halvings until successive sums agree to working precision. None if the interval is not a finite a < b.