Skip to main content

BesselFloat

Trait BesselFloat 

Source
pub trait BesselFloat:
    Float
    + Debug
    + 'static {
    const MACH_EPSILON: Self;
    const MACH_TINY: Self;
    const MACH_HUGE: Self;
    const MACH_DIGITS: i32;
    const MACH_MIN_EXP: i32;
    const MACH_MAX_EXP: i32;

    // Required methods
    fn tol() -> Self;
    fn dig() -> Self;
    fn fnul() -> Self;
    fn rl() -> Self;
    fn elim() -> Self;
    fn alim() -> Self;
}
Expand description

Floating-point trait for Bessel function computation.

Implemented for f64 and f32. Provides machine constants and derived thresholds used by the Amos algorithm.

Required Associated Constants§

Source

const MACH_EPSILON: Self

Machine epsilon (D1MACH(3)).

Source

const MACH_TINY: Self

Smallest positive normal number (D1MACH(1)).

Source

const MACH_HUGE: Self

Largest representable number (D1MACH(2)).

Source

const MACH_DIGITS: i32

Number of binary digits in the mantissa (I1MACH(14)).

Source

const MACH_MIN_EXP: i32

Minimum binary exponent (I1MACH(12)).

Source

const MACH_MAX_EXP: i32

Maximum binary exponent (I1MACH(11)).

Required Methods§

Source

fn tol() -> Self

Tolerance: max(MACH_EPSILON, 1e-18).

Source

fn dig() -> Self

Decimal digits: log10(2) * (DIGITS - 1).

Source

fn fnul() -> Self

Large order threshold: 10 + 6*(DIG - 3).

Source

fn rl() -> Self

Asymptotic region boundary: 1.2*DIG + 3.

Source

fn elim() -> Self

Underflow elimination threshold: 2.303*(K*R1M5 - 3), K = min(|MIN_EXP|, MAX_EXP).

Source

fn alim() -> Self

Overflow elimination threshold: ELIM + max(-2.303R1M5(DIGITS-1), -41.45).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BesselFloat for f32

Source§

const MACH_EPSILON: f32 = 1.1920929e-7

Source§

const MACH_TINY: f32 = 1.1754944e-38

Source§

const MACH_HUGE: f32 = 3.4028235e+38

Source§

const MACH_DIGITS: i32 = 24

Source§

const MACH_MIN_EXP: i32 = -125

Source§

const MACH_MAX_EXP: i32 = 128

Source§

fn tol() -> f32

Source§

fn dig() -> f32

Source§

fn fnul() -> f32

Source§

fn rl() -> f32

Source§

fn elim() -> f32

Source§

fn alim() -> f32

Source§

impl BesselFloat for f64

Source§

const MACH_EPSILON: f64 = 2.220446049250313e-16

Source§

const MACH_TINY: f64 = 2.2250738585072014e-308

Source§

const MACH_HUGE: f64 = 1.7976931348623157e+308

Source§

const MACH_DIGITS: i32 = 53

Source§

const MACH_MIN_EXP: i32 = -1021

Source§

const MACH_MAX_EXP: i32 = 1024

Source§

fn tol() -> f64

Source§

fn dig() -> f64

Source§

fn fnul() -> f64

Source§

fn rl() -> f64

Source§

fn elim() -> f64

Source§

fn alim() -> f64

Implementors§