pub struct FloatInfo {
pub epsilon: f64,
pub max: f64,
pub min: f64,
pub min_positive: f64,
}Expand description
Numerical precision properties for a floating-point dtype.
Equivalent to NumPy’s finfo / PyTorch’s torch.finfo. All values are
widened to f64 so they can be inspected without knowing the concrete
element type at compile time.
Fields§
§epsilon: f64Machine epsilon: smallest value such that 1.0 + epsilon != 1.0.
max: f64Largest representable finite value.
min: f64Most negative representable finite value.
min_positive: f64Smallest positive normal value.
Trait Implementations§
impl Copy for FloatInfo
impl StructuralPartialEq for FloatInfo
Auto Trait Implementations§
impl Freeze for FloatInfo
impl RefUnwindSafe for FloatInfo
impl Send for FloatInfo
impl Sync for FloatInfo
impl Unpin for FloatInfo
impl UnsafeUnpin for FloatInfo
impl UnwindSafe for FloatInfo
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