PrecisionFloat

Trait PrecisionFloat 

Source
pub trait PrecisionFloat:
    Clone
    + Debug
    + Display
    + PartialEq
    + PartialOrd
    + NumFloat
    + FloatConst
    + FromPrimitive
    + ToPrimitive
    + Zero
    + One
    + Send
    + Sync
    + 'static {
Show 16 methods // Required methods fn from_f64(value: f64) -> Self; fn to_f64(self) -> f64; fn sqrt_precise(self) -> Self; fn powf_precise(self, exp: Self) -> Self; fn sin_precise(self) -> Self; fn cos_precise(self) -> Self; fn tan_precise(self) -> Self; fn sinh_precise(self) -> Self; fn cosh_precise(self) -> Self; fn tanh_precise(self) -> Self; fn ln_precise(self) -> Self; fn exp_precise(self) -> Self; fn abs_precise(self) -> Self; fn epsilon() -> Self; fn default_tolerance() -> Self; fn orbital_tolerance() -> Self;
}
Expand description

Unified trait for floating-point arithmetic in scientific computing

This trait abstracts over different precision levels to allow mathematical calculations with appropriate numerical accuracy.

Required Methods§

Source

fn from_f64(value: f64) -> Self

Create from f64 value

Source

fn to_f64(self) -> f64

Convert to f64 (may lose precision)

Source

fn sqrt_precise(self) -> Self

Square root with high precision

Source

fn powf_precise(self, exp: Self) -> Self

Power function with high precision

Source

fn sin_precise(self) -> Self

Trigonometric functions with high precision

Source

fn cos_precise(self) -> Self

Cosine function with high precision

Source

fn tan_precise(self) -> Self

Tangent function with high precision

Source

fn sinh_precise(self) -> Self

Hyperbolic functions with high precision

Source

fn cosh_precise(self) -> Self

Hyperbolic cosine with high precision

Source

fn tanh_precise(self) -> Self

Hyperbolic tangent with high precision

Source

fn ln_precise(self) -> Self

Natural logarithm with high precision

Source

fn exp_precise(self) -> Self

Exponential function with high precision

Source

fn abs_precise(self) -> Self

Absolute value

Source

fn epsilon() -> Self

Machine epsilon for this precision level

Source

fn default_tolerance() -> Self

Recommended tolerance for numerical calculations

Source

fn orbital_tolerance() -> Self

Specialized tolerance for orbital mechanics calculations

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 PrecisionFloat for f64

Standard f64 implementation for general use

Source§

fn from_f64(value: f64) -> Self

Source§

fn to_f64(self) -> f64

Source§

fn sqrt_precise(self) -> Self

Source§

fn powf_precise(self, exp: Self) -> Self

Source§

fn sin_precise(self) -> Self

Source§

fn cos_precise(self) -> Self

Source§

fn tan_precise(self) -> Self

Source§

fn sinh_precise(self) -> Self

Source§

fn cosh_precise(self) -> Self

Source§

fn tanh_precise(self) -> Self

Source§

fn ln_precise(self) -> Self

Source§

fn exp_precise(self) -> Self

Source§

fn abs_precise(self) -> Self

Source§

fn epsilon() -> Self

Source§

fn default_tolerance() -> Self

Source§

fn orbital_tolerance() -> Self

Implementors§