pub struct Number(/* private fields */);Expand description
A finite calculation number with a deliberately private representation.
Implementations§
Source§impl Number
impl Number
Sourcepub fn try_from_f64(value: f64) -> CalcResult<Self>
pub fn try_from_f64(value: f64) -> CalcResult<Self>
Construct a number from a finite binary64 value.
Negative zero is normalized to positive zero. NaN and infinities return
#NUM!.
Sourcepub const fn as_i64(self) -> Option<i64>
pub const fn as_i64(self) -> Option<i64>
Return the original integer representation when it is preserved.
Sourcepub fn as_i64_exact(self) -> Option<i64>
pub fn as_i64_exact(self) -> Option<i64>
Return an integer when the mathematical value is exactly representable
as i64, regardless of its internal representation.
Sourcepub fn is_integral(self) -> bool
pub fn is_integral(self) -> bool
Return whether this number is mathematically integral.
Trait Implementations§
impl Copy for Number
Auto Trait Implementations§
impl Forget for Number
impl Freeze for Number
impl Move for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnsafeUnpin for Number
impl UnwindSafe for Number
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