pub struct FixedInterval { /* private fields */ }Expand description
A real number between lo * 2^-bits and hi * 2^-bits.
Implementations§
Source§impl FixedInterval
impl FixedInterval
Sourcepub fn integer(value: i64, bits: u32) -> Self
pub fn integer(value: i64, bits: u32) -> Self
Exactly value (an integer), at bits fractional bits.
Sourcepub fn from_dyadic(value: &Dyadic, bits: u32) -> Self
pub fn from_dyadic(value: &Dyadic, bits: u32) -> Self
The narrowest interval at bits holding value.
Sourcepub fn from_f64(value: f64, bits: u32) -> Option<Self>
pub fn from_f64(value: f64, bits: u32) -> Option<Self>
The narrowest interval at bits holding a finite value.
Sourcepub fn div_int(&self, divisor: u64) -> Self
pub fn div_int(&self, divisor: u64) -> Self
The quotient by a positive integer, rounded outward.
Sourcepub fn with_bits(&self, bits: u32) -> Self
pub fn with_bits(&self, bits: u32) -> Self
The same interval at bits fractional bits, rounded outward.
Sourcepub fn sign(&self) -> Option<Sign>
pub fn sign(&self) -> Option<Sign>
The sign every value in the interval shares: Zero only for the
single point zero, None where the interval straddles zero.
Trait Implementations§
Source§impl Clone for FixedInterval
impl Clone for FixedInterval
Source§fn clone(&self) -> FixedInterval
fn clone(&self) -> FixedInterval
Returns a copy 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 FixedInterval
impl Debug for FixedInterval
Source§impl PartialEq for FixedInterval
impl PartialEq for FixedInterval
impl Eq for FixedInterval
impl StructuralPartialEq for FixedInterval
Auto Trait Implementations§
impl Freeze for FixedInterval
impl RefUnwindSafe for FixedInterval
impl Send for FixedInterval
impl Sync for FixedInterval
impl Unpin for FixedInterval
impl UnwindSafe for FixedInterval
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