pub struct Scaled<F> { /* private fields */ }Expand description
A product of floats held as m × 2^e, a mantissa m and a whole exponent e kept apart, so that the product never leaves the normal floats however many items it takes. A step leaves the mantissa where it is while its magnitude stays inside 2^±511 (2^±63 in f32), half the floats’ exponents, so that the product of two mantissas stays normal, and moves the mantissa’s exponent into e once it leaves. normal says whether every step so far was a nonzero normal float. ScaledProduct folds into it. The exponent sums exactly up to 2^53 in f64 and 2^24 in f32, which a product that ends inside the floats’ range never nears.
Implementations§
Trait Implementations§
impl<F> Copy for Scaled<F>where
F: Copy,
Auto Trait Implementations§
impl<F> Forget for Scaled<F>
impl<F> Freeze for Scaled<F>where
F: Freeze,
impl<F> RefUnwindSafe for Scaled<F>where
F: RefUnwindSafe,
impl<F> Send for Scaled<F>where
F: Send,
impl<F> Sync for Scaled<F>where
F: Sync,
impl<F> Unpin for Scaled<F>where
F: Unpin,
impl<F> UnsafeUnpin for Scaled<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for Scaled<F>where
F: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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