pub struct Split { /* private fields */ }Expand description
An exact sum of two Real values split at an absolute binary digit.
Implementations§
Trait Implementations§
Source§impl Real for Split
impl Real for Split
Source§fn sign(&self) -> Option<bool>
fn sign(&self) -> Option<bool>
The sign bit.
This is not always well-defined, so the result is an
Option.
This is distinct from is_negative (e.g. -0.0 is not negative).Source§fn exp(&self) -> Option<isize>
fn exp(&self) -> Option<isize>
The exponent of this number when viewed as
(-1)^s * c * b^exp
where c is an integer integer. Only well-defined for finite,
non-zero numbers.Source§fn e(&self) -> Option<isize>
fn e(&self) -> Option<isize>
The exponent of this number when viewed as
(-1)^s * f * b^e
where f is a fraction between 1 and 2. This is the preferred
IEEE 754 interpretation of an exponent. Only well-defined for
finite, non-zero numbers.Source§fn n(&self) -> Option<isize>
fn n(&self) -> Option<isize>
The “absolute digit”, the place below the least significant
digit of the mantissa. Always equal to
self.exp() - 1.
For integer formats, this is just -1. Only well-defined for
finite, non-zero numbers.Source§fn c(&self) -> Option<Integer>
fn c(&self) -> Option<Integer>
The _unsigned“ integer significand of this number when viewed as
(-1)^s * c * b^exp. Only well-defined for finite, non-zero
numbers. Only well-defined for finite, non-zero numbers.Source§fn m(&self) -> Option<Integer>
fn m(&self) -> Option<Integer>
The signed integer significand of this number when viewed as
(-1)^s * c * b^exp. Only well-defined for finite, non-zero
numbers. Only well-defined for finite, non-zero numbers.Source§fn prec(&self) -> Option<usize>
fn prec(&self) -> Option<usize>
Precision of the significand.
This is just
floor(logb(c)) where b is the radix and c is
the integer significand. Only well-defined for finite,
non-zero numbers.Source§fn is_nar(&self) -> bool
fn is_nar(&self) -> bool
Returns
true if this number is not a real number.
Example: NaN or +/-Inf from the IEEE 754 standard.Source§fn is_finite(&self) -> bool
fn is_finite(&self) -> bool
Returns
true if this number is finite.
For values that do not encode numbers, intervals, or even limiting
behavior, the result is false.Source§fn is_infinite(&self) -> bool
fn is_infinite(&self) -> bool
Returns
true if this number if infinite.
For values that do not encode numbers, intervals, or even limiting
behavior, the result is false.Source§fn is_negative(&self) -> Option<bool>
fn is_negative(&self) -> Option<bool>
Returns
true if this number is negative.
This is not always well-defined, so the result is an Option.
This is not necessarily the same as the sign bit (the IEEE 754
standard differentiates between -0.0 and +0.0).Source§fn is_numerical(&self) -> bool
fn is_numerical(&self) -> bool
Returns
true if this number represents a numerical value:
either a finite number, interval, or some limiting value.Auto Trait Implementations§
impl Freeze for Split
impl RefUnwindSafe for Split
impl Send for Split
impl Sync for Split
impl Unpin for Split
impl UnwindSafe for Split
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.