pub enum RoundingMode {
HalfEven,
HalfAway,
HalfToZero,
ToZero,
ToInf,
ToNegInf,
AwayFromZero,
}Expand description
Rounding modes for native BigFloat arithmetic.
Mirrors the set of rounding policies natively supported by the binary
BigFloat core. The seven variants cover all IEEE-754 directed and
nearest-tie-break combinations.
Variants§
HalfEven
Round half to even (banker’s rounding).
HalfAway
Round half away from zero.
HalfToZero
Round half toward zero (truncate ties).
ToZero
Truncate toward zero (drop fractional bits).
ToInf
Round toward +∞.
ToNegInf
Round toward -∞.
AwayFromZero
Round away from zero (round up in magnitude).
Trait Implementations§
Source§impl Clone for RoundingMode
impl Clone for RoundingMode
Source§fn clone(&self) -> RoundingMode
fn clone(&self) -> RoundingMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoundingMode
impl Debug for RoundingMode
Source§impl Hash for RoundingMode
impl Hash for RoundingMode
Source§impl PartialEq for RoundingMode
impl PartialEq for RoundingMode
Source§fn eq(&self, other: &RoundingMode) -> bool
fn eq(&self, other: &RoundingMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for RoundingMode
impl Eq for RoundingMode
impl StructuralPartialEq for RoundingMode
Auto Trait Implementations§
impl Freeze for RoundingMode
impl RefUnwindSafe for RoundingMode
impl Send for RoundingMode
impl Sync for RoundingMode
impl Unpin for RoundingMode
impl UnsafeUnpin for RoundingMode
impl UnwindSafe for RoundingMode
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