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§
Sourceconst CARLSON_THRESH: Self
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))).
Sourceconst RC_SERIES_THRESH: Self
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".