pub struct CachedFBig { /* private fields */ }Expand description
A float stored at extra working precision so later requests at lower (or equal) precision reuse the cache instead of recomputing.
Implementations§
Source§impl CachedFBig
impl CachedFBig
Sourcepub fn new(inner: ExactNum) -> CachedFBig
pub fn new(inner: ExactNum) -> CachedFBig
Wrap an already-computed value, retaining its current mantissa width.
Sourcepub fn cached_bit_len(&self) -> Option<usize>
pub fn cached_bit_len(&self) -> Option<usize>
Cached mantissa width in bits (None for Inf / NaN).
Sourcepub fn round(&self, p: usize, rm: RoundingMode) -> ExactNum
pub fn round(&self, p: usize, rm: RoundingMode) -> ExactNum
Round the cached value to p bits.
Trait Implementations§
Source§impl Clone for CachedFBig
impl Clone for CachedFBig
Source§fn clone(&self) -> CachedFBig
fn clone(&self) -> CachedFBig
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 moreAuto Trait Implementations§
impl Freeze for CachedFBig
impl RefUnwindSafe for CachedFBig
impl Send for CachedFBig
impl Sync for CachedFBig
impl Unpin for CachedFBig
impl UnsafeUnpin for CachedFBig
impl UnwindSafe for CachedFBig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more