pub trait PrecisionFloat:
Clone
+ Debug
+ Display
+ PartialEq
+ PartialOrd
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Output = Self>
+ Div<Output = Self>
+ Neg<Output = Self>
+ Send
+ Sync
+ 'static {
Show 26 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;
fn PI() -> Self;
fn one() -> Self;
fn zero() -> Self;
fn max(self, other: Self) -> Self;
fn min(self, other: Self) -> Self;
// Provided methods
fn sqrt(self) -> Self { ... }
fn abs(self) -> Self { ... }
fn zero_array_4() -> [Self; 4] { ... }
fn zero_matrix_4x4() -> [[Self; 4]; 4] { ... }
fn zero_tensor_4x4x4() -> [[[Self; 4]; 4]; 4] { ... }
}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§
Sourcefn sqrt_precise(self) -> Self
fn sqrt_precise(self) -> Self
Square root with high precision
Sourcefn powf_precise(self, exp: Self) -> Self
fn powf_precise(self, exp: Self) -> Self
Power function with high precision
Sourcefn sin_precise(self) -> Self
fn sin_precise(self) -> Self
Trigonometric functions with high precision
Sourcefn cos_precise(self) -> Self
fn cos_precise(self) -> Self
Cosine function with high precision
Sourcefn tan_precise(self) -> Self
fn tan_precise(self) -> Self
Tangent function with high precision
Sourcefn sinh_precise(self) -> Self
fn sinh_precise(self) -> Self
Hyperbolic functions with high precision
Sourcefn cosh_precise(self) -> Self
fn cosh_precise(self) -> Self
Hyperbolic cosine with high precision
Sourcefn tanh_precise(self) -> Self
fn tanh_precise(self) -> Self
Hyperbolic tangent with high precision
Sourcefn ln_precise(self) -> Self
fn ln_precise(self) -> Self
Natural logarithm with high precision
Sourcefn exp_precise(self) -> Self
fn exp_precise(self) -> Self
Exponential function with high precision
Sourcefn abs_precise(self) -> Self
fn abs_precise(self) -> Self
Absolute value
Sourcefn default_tolerance() -> Self
fn default_tolerance() -> Self
Recommended tolerance for numerical calculations
Sourcefn orbital_tolerance() -> Self
fn orbital_tolerance() -> Self
Specialized tolerance for orbital mechanics calculations
Provided Methods§
Sourcefn zero_array_4() -> [Self; 4]
fn zero_array_4() -> [Self; 4]
Create a 4-element array filled with zero values
Sourcefn zero_matrix_4x4() -> [[Self; 4]; 4]
fn zero_matrix_4x4() -> [[Self; 4]; 4]
Create a 4x4 matrix filled with zero values
Sourcefn zero_tensor_4x4x4() -> [[[Self; 4]; 4]; 4]
fn zero_tensor_4x4x4() -> [[[Self; 4]; 4]; 4]
Create a 4x4x4 tensor filled with zero values
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
impl PrecisionFloat for f64
Standard f64 implementation for general use
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
fn PI() -> Self
fn one() -> Self
fn zero() -> Self
fn max(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Implementors§
impl PrecisionFloat for DashuFloat
high-precision or wasm-precision) and non-crate feature native-precision only.