Skip to main content

EllipticConsts

Trait EllipticConsts 

Source
pub trait EllipticConsts {
    const CARLSON_THRESH: Self;
    const RC_SERIES_THRESH: Self;
}
Expand description

Compile-time per-element constants for the elliptic routines, so values that are otherwise a few runtime ops (e.g. the Carlson convergence threshold, three sequential sqrts) become a constant splat. Declared for f32/f64; add more element types as needed.

Required Associated Constants§

Source

const CARLSON_THRESH: Self

(3 * eps)^(1/8): the relative-deviation threshold at which the Carlson 7th-order Taylor tail (~deviation^8) drops below rounding. Equals sqrt(sqrt(sqrt(eps + eps + eps))).

Source

const RC_SERIES_THRESH: Self

|t| below which carlson_rc takes its 8-term series in t = (y - x)/x instead of the closed atan/ln forms. The tail is t^8/17, so this is where that drops below eps: 1/128 at binary32/64 (1.5e-17). A wider element type needs it smaller (double-double takes 2^-14), or every R_J, which calls R_C(1, 1 + E_n) with a small E_n on every step, is capped at the series’ truncation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl EllipticConsts for f32

Source§

const CARLSON_THRESH: f32 = 0.15637917816638947

Source§

const RC_SERIES_THRESH: f32 = 0.0078125

Source§

impl EllipticConsts for f64

Source§

const CARLSON_THRESH: f64 = 0.012674918778210762

Source§

const RC_SERIES_THRESH: f64 = 0.0078125

Implementors§

Last built: 2026-09-08 21:35:55 UTC