pub struct Float64(/* private fields */);Expand description
Finite IEEE-754 binary64 wrapper. Non-finite values cannot be constructed through the public API.
Implementations§
Source§impl Float64
impl Float64
pub fn new(value: f64) -> Result<Float64, EngineError>
pub fn get(self) -> f64
Sourcepub fn canonical(self) -> Float64
pub fn canonical(self) -> Float64
Canonicalize negative zero to positive zero for hashing/equality.
pub fn to_rational_exact(self) -> Option<BigRational>
pub fn parse(source: &str) -> Result<Float64, EngineError>
Trait Implementations§
impl Copy for Float64
impl Eq for Float64
Source§impl Ord for Float64
impl Ord for Float64
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Auto Trait Implementations§
impl Freeze for Float64
impl RefUnwindSafe for Float64
impl Send for Float64
impl Sync for Float64
impl Unpin for Float64
impl UnsafeUnpin for Float64
impl UnwindSafe for Float64
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more