#[repr(transparent)]pub struct F8(pub u8);Expand description
Finite-only 8-bit float: E4M3 with the top exponent reserved for NaN.
Tuple Fields§
§0: u8Implementations§
Trait Implementations§
Source§impl AddAssign for F8
impl AddAssign for F8
Source§fn add_assign(&mut self, rhs: F8)
fn add_assign(&mut self, rhs: F8)
Performs the
+= operation. Read moreimpl Copy for F8
Source§impl FloatElement for F8
impl FloatElement for F8
Source§fn signum(self) -> Self
fn signum(self) -> Self
Sign of
self: 1 for positive/+0, -1 for negative/-0, NaN for
NaN (matching f64::signum / num_traits::Float::signum).Source§fn powi(self, n: i32) -> Self
fn powi(self, n: i32) -> Self
self raised to an integer power via exponentiation by squaring. Read moreSource§fn erfc(self) -> Self
fn erfc(self) -> Self
Complementary error function
erfc(self) = 1 - erf(self), computed without
the cancellation error of 1 - erf for large self.Source§fn lgamma(self) -> Self
fn lgamma(self) -> Self
Natural logarithm of the absolute value of the gamma function,
ln|Γ(self)|.Source§fn default_epsilon() -> Selfwhere
Self: RealField,
fn default_epsilon() -> Selfwhere
Self: RealField,
Machine epsilon (
nalgebra::RealField::default_epsilon compatibility alias). Read moreSource§fn pi() -> Selfwhere
Self: RealField,
fn pi() -> Selfwhere
Self: RealField,
Returns
π as this float type (nalgebra compatibility alias for RealField::PI).Source§fn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Componentwise maximum (method form; prefer
NumericElement::max_scalar in new code).Source§impl MulAssign for F8
impl MulAssign for F8
Source§fn mul_assign(&mut self, rhs: F8)
fn mul_assign(&mut self, rhs: F8)
Performs the
*= operation. Read moreSource§impl NumericElement for F8
impl NumericElement for F8
Source§const MIN_VALUE: F8
const MIN_VALUE: F8
The minimum representable finite value (negative infinity or
i32::MIN). Read moreSource§const MAX_VALUE: F8
const MAX_VALUE: F8
The maximum representable finite value (positive infinity or
i32::MAX). Read moreSource§const BYTE_WIDTH: usize = 1
const BYTE_WIDTH: usize = 1
Number of bytes per element.
Source§fn sqrt(self) -> F8
fn sqrt(self) -> F8
Square root. Floats follow IEEE 754 (
NaN for negative inputs); integers
return the exact floor integer square root (isqrt), with negative signed
inputs defined to return 0 (integers have no NaN to signal the domain
error). No f64 round-trip, so the integer result is exact for all operands.Source§fn count_ones(self) -> u32
fn count_ones(self) -> u32
Count set bits (population count).
Source§fn min_scalar(self, other: Self) -> Selfwhere
Self: PartialOrd,
fn min_scalar(self, other: Self) -> Selfwhere
Self: PartialOrd,
Source§fn max_scalar(self, other: Self) -> Selfwhere
Self: PartialOrd,
fn max_scalar(self, other: Self) -> Selfwhere
Self: PartialOrd,
Source§fn saturating_add(self, rhs: Self) -> Self
fn saturating_add(self, rhs: Self) -> Self
Saturating addition. Read more
Source§fn saturating_mul(self, rhs: Self) -> Self
fn saturating_mul(self, rhs: Self) -> Self
Saturating multiplication. Read more
Source§fn checked_add(self, rhs: Self) -> Option<Self>
fn checked_add(self, rhs: Self) -> Option<Self>
Source§fn checked_mul(self, rhs: Self) -> Option<Self>
fn checked_mul(self, rhs: Self) -> Option<Self>
Source§impl PartialOrd for F8
impl PartialOrd for F8
impl Pod for F8
impl Pod for F8
Source§impl RemAssign for F8
impl RemAssign for F8
Source§fn rem_assign(&mut self, rhs: F8)
fn rem_assign(&mut self, rhs: F8)
Performs the
%= operation. Read moreimpl StructuralPartialEq for F8
Source§impl SubAssign for F8
impl SubAssign for F8
Source§fn sub_assign(&mut self, rhs: F8)
fn sub_assign(&mut self, rhs: F8)
Performs the
-= operation. Read moreSource§impl UnitScalar for F8
impl UnitScalar for F8
Source§fn scale_by_f64(self, factor: f64) -> F8
fn scale_by_f64(self, factor: f64) -> F8
Scale this value by a real coefficient in the scalar’s native precision.
Auto Trait Implementations§
impl Freeze for F8
impl RefUnwindSafe for F8
impl Send for F8
impl Sync for F8
impl Unpin for F8
impl UnsafeUnpin for F8
impl UnwindSafe for F8
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.