#[repr(u32)]pub enum RoundingMode {
RoundNearestTiesToEven = 0,
RoundTowardPositive = 1,
RoundTowardNegative = 2,
RoundTowardZero = 3,
RoundNearestTiesToAway = 4,
Last = 5,
}Expand description
Rounding modes for floating-point numbers.
For many floating-point operations, infinitely precise results may not be representable with the number of available bits. Thus, the results are rounded in a certain way to one of the representable floating-point numbers.
\verbatim embed:rst:leading-asterisk
These rounding modes directly follow the SMT-LIB theory for floating-point
arithmetic, which in turn is based on IEEE Standard 754 :cite:IEEE754.
The rounding modes are specified in Sections 4.3.1 and 4.3.2 of the IEEE
Standard 754.
\endverbatim
Variants§
RoundNearestTiesToEven = 0
RoundTowardPositive = 1
RoundTowardNegative = 2
RoundTowardZero = 3
RoundNearestTiesToAway = 4
Last = 5
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 · 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
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