Skip to main content

f8e4m3b11fnuz

Struct f8e4m3b11fnuz 

Source
pub struct f8e4m3b11fnuz(/* private fields */);
Expand description

Signed 8-bit E4M3 finite-only type with bias 11, unsigned zero, and a single NaN.

Implementations§

Source§

impl f8e4m3b11fnuz

Source

pub const RADIX: u32 = 2

Radix of the floating point representation.

Source

pub const STORAGE_BITS: u32 = 8

Number of storage bits used by this format.

Source

pub const EXPONENT_BITS: u32 = 4

Number of exponent bits in this format.

Source

pub const MANTISSA_BITS: u32 = 3

Number of stored mantissa bits in this format.

Source

pub const DIGITS: u32 = 4

Number of significant base-2 digits in this format.

Source

pub const MANTISSA_DIGITS: u32 = 4

Number of significant base-2 mantissa digits in this format.

Source

pub const EXPONENT_BIAS: i32 = 11

Exponent bias used by this format.

Source

pub const ZERO: Self

Unsigned zero.

Raw bits: 0x00.

Source

pub const NEG_ZERO: Self

This format has unsigned zero; this aliases ZERO.

Raw bits: 0x00.

Source

pub const ONE: Self

One (1.0).

Raw bits: 0x58.

Source

pub const NEG_ONE: Self

Negative one (-1.0).

Raw bits: 0xd8.

Source

pub const MIN_POSITIVE_SUBNORMAL: Self

Minimum positive subnormal value.

Raw bits: 0x01.

Source

pub const MAX_SUBNORMAL: Self

Maximum subnormal value.

Raw bits: 0x07.

Source

pub const MIN_POSITIVE: Self

Minimum positive normal value.

Raw bits: 0x08.

Source

pub const MIN: Self

Most negative finite value.

Raw bits: 0xff.

Source

pub const MAX: Self

Maximum finite value.

Raw bits: 0x7f.

Source

pub const EPSILON: Self

Difference between 1.0 and the next larger representable value.

Raw bits: 0x59.

Source

pub const INFINITY: Self

This format has no infinity; converting positive infinity or overflowing in the positive direction produces this NaN value.

Raw bits: 0x80.

Source

pub const NEG_INFINITY: Self

This format has no infinity; converting negative infinity or overflowing in the negative direction produces this NaN value.

Raw bits: 0x80.

Source

pub const NAN: Self

Canonical NaN value.

Raw bits: 0x80.

Source

pub const fn from_bits(bits: u8) -> Self

Creates a value from its raw storage bits.

All eight bits are preserved in the byte. For sub-byte formats, byte values outside the canonical storage range are decoded compatibly with ml-dtypes raw-byte views and may alias canonical values.

Source

pub const fn to_bits(self) -> u8

Returns the raw storage bits of this value.

Source

pub const fn from_le_bytes(bytes: [u8; 1]) -> Self

Creates a value from its little-endian byte representation.

Source

pub const fn from_be_bytes(bytes: [u8; 1]) -> Self

Creates a value from its big-endian byte representation.

Source

pub const fn from_ne_bytes(bytes: [u8; 1]) -> Self

Creates a value from its native-endian byte representation.

Source

pub const fn to_le_bytes(self) -> [u8; 1]

Returns the little-endian byte representation of this value.

Source

pub const fn to_be_bytes(self) -> [u8; 1]

Returns the big-endian byte representation of this value.

Source

pub const fn to_ne_bytes(self) -> [u8; 1]

Returns the native-endian byte representation of this value.

Source

pub fn from_f32(value: f32) -> Self

Converts an f32 to this format.

The result is rounded to the nearest representable value. Values outside the finite range follow this format’s overflow behavior.

Source

pub fn from_f64(value: f64) -> Self

Converts an f64 to this format.

The value is first rounded to f32, then converted to this format.

Source

pub fn to_f32(self) -> f32

Converts this value to f32.

Source

pub fn to_f64(self) -> f64

Converts this value to f64.

Source

pub fn is_nan(self) -> bool

Returns true if this value is NaN.

Source

pub fn is_infinite(self) -> bool

Returns true if this value is positive or negative infinity.

Source

pub fn is_finite(self) -> bool

Returns true if this value is neither infinite nor NaN.

Source

pub fn is_normal(self) -> bool

Returns true if this value is finite, nonzero, and not subnormal.

Source

pub fn classify(self) -> FpCategory

Returns the floating point category of this value.

Source

pub const fn is_sign_positive(self) -> bool

Returns true if this value has a positive sign.

Unsigned formats always return true.

Source

pub const fn is_sign_negative(self) -> bool

Returns true if this value has a negative sign.

Unsigned formats always return false.

Source

pub fn copysign(self, sign: Self) -> Self

Returns a value with the magnitude of self and the sign of sign.

Source

pub fn signum(self) -> Self

Returns a number representing the sign of self.

NaN and zero values are returned unchanged.

Source

pub fn abs(self) -> Self

Returns the absolute value of self.

Source

pub fn floor(self) -> Self

Returns the greatest integer less than or equal to self, rounded to this format.

Source

pub fn ceil(self) -> Self

Returns the smallest integer greater than or equal to self, rounded to this format.

Source

pub fn trunc(self) -> Self

Returns the integer part of self, rounded toward zero.

Source

pub fn round_ties_even(self) -> Self

Returns self rounded to the nearest integer, with halfway cases rounded to even.

Source

pub fn recip(self) -> Self

Returns the reciprocal 1 / self, rounded to this format.

Source

pub fn powf(self, n: Self) -> Self

Raises self to the floating point power n, rounded to this format.

Source

pub fn sqrt(self) -> Self

Returns the square root of self, rounded to this format.

Source

pub fn exp(self) -> Self

Returns e^(self), rounded to this format.

Source

pub fn exp2(self) -> Self

Returns 2^(self), rounded to this format.

Source

pub fn exp_m1(self) -> Self

Returns e^(self) - 1, rounded to this format.

Source

pub fn ln(self) -> Self

Returns the natural logarithm of self, rounded to this format.

Source

pub fn ln_1p(self) -> Self

Returns ln(1 + self), rounded to this format.

Source

pub fn log2(self) -> Self

Returns the base-2 logarithm of self, rounded to this format.

Source

pub fn log10(self) -> Self

Returns the base-10 logarithm of self, rounded to this format.

Source

pub fn cbrt(self) -> Self

Returns the cube root of self, rounded to this format.

Source

pub fn hypot(self, other: Self) -> Self

Returns sqrt(self^2 + other^2), rounded to this format.

Source

pub fn sin(self) -> Self

Computes the sine of self in radians, rounded to this format.

Source

pub fn cos(self) -> Self

Computes the cosine of self in radians, rounded to this format.

Source

pub fn tan(self) -> Self

Computes the tangent of self in radians, rounded to this format.

Source

pub fn asin(self) -> Self

Computes the arcsine of self, in radians, rounded to this format.

Source

pub fn acos(self) -> Self

Computes the arccosine of self, in radians, rounded to this format.

Source

pub fn atan(self) -> Self

Computes the arctangent of self, in radians, rounded to this format.

Source

pub fn atan2(self, other: Self) -> Self

Computes the four-quadrant arctangent of self and other, in radians.

This is equivalent to f32::atan2(self.to_f32(), other.to_f32()), rounded to this format.

Source

pub fn sinh(self) -> Self

Computes the hyperbolic sine of self, rounded to this format.

Source

pub fn cosh(self) -> Self

Computes the hyperbolic cosine of self, rounded to this format.

Source

pub fn tanh(self) -> Self

Computes the hyperbolic tangent of self, rounded to this format.

Source

pub fn min(self, other: Self) -> Self

Returns the minimum of self and other, ignoring NaN when possible.

If exactly one argument is NaN, the other argument is returned.

Source

pub fn max(self, other: Self) -> Self

Returns the maximum of self and other, ignoring NaN when possible.

If exactly one argument is NaN, the other argument is returned.

Source

pub fn clamp(self, min: Self, max: Self) -> Self

Restricts self to the interval [min, max].

§Panics

Panics if min or max is NaN, or if min > max.

Source

pub fn total_cmp(&self, other: &Self) -> Ordering

Returns a total ordering over all bit patterns in this format.

The ordering distinguishes signed zeros and orders NaN values consistently.

Source

pub fn serialize_as_f32<S: Serializer>( &self, serializer: S, ) -> Result<S::Ok, S::Error>

Available on crate feature serde only.

Alternate serde adapter for serializing as an f32.

§Errors

Returns an error if the serializer cannot serialize an f32.

Source

pub fn serialize_as_string<S: Serializer>( &self, serializer: S, ) -> Result<S::Ok, S::Error>

Available on crate feature serde only.

Alternate serde adapter for serializing as a string.

§Errors

Returns an error if the serializer cannot collect this value as a string.

Trait Implementations§

Source§

impl Add for f8e4m3b11fnuz

Source§

type Output = f8e4m3b11fnuz

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for f8e4m3b11fnuz

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl Archive for f8e4m3b11fnuz

Available on crate feature rkyv only.
Source§

type Archived = f8e4m3b11fnuz

The archived representation of this type. Read more
Source§

type Resolver = ()

The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type.
Source§

fn resolve(&self, _: Self::Resolver, out: Place<Self::Archived>)

Creates the archived version of this value at the given position and writes it to the given output. Read more
Source§

const COPY_OPTIMIZATION: CopyOptimization<Self> = _

An optimization flag that allows the bytes of this type to be copied directly to a writer instead of calling serialize. Read more
Source§

impl Bounded for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

fn min_value() -> Self

Returns the smallest finite number this type can represent
Source§

fn max_value() -> Self

Returns the largest finite number this type can represent
Source§

impl Clone for f8e4m3b11fnuz

Source§

fn clone(&self) -> f8e4m3b11fnuz

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for f8e4m3b11fnuz

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for f8e4m3b11fnuz

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for f8e4m3b11fnuz

Available on crate feature serde only.
Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<D> Deserialize<f8e4m3b11fnuz, D> for f8e4m3b11fnuz
where D: Fallible + ?Sized,

Available on crate feature rkyv only.
Source§

fn deserialize(&self, _: &mut D) -> Result<f8e4m3b11fnuz, D::Error>

Deserializes using the given deserializer
Source§

impl Display for f8e4m3b11fnuz

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Distribution<f8e4m3b11fnuz> for Exp1

Available on crate feature rand_distr only.
Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f8e4m3b11fnuz

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl Distribution<f8e4m3b11fnuz> for Open01

Available on crate feature rand_distr only.
Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f8e4m3b11fnuz

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl Distribution<f8e4m3b11fnuz> for OpenClosed01

Available on crate feature rand_distr only.
Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f8e4m3b11fnuz

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl Distribution<f8e4m3b11fnuz> for StandardNormal

Available on crate feature rand_distr only.
Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f8e4m3b11fnuz

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl Distribution<f8e4m3b11fnuz> for StandardUniform

Available on crate feature rand_distr only.
Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f8e4m3b11fnuz

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl Div for f8e4m3b11fnuz

Source§

type Output = f8e4m3b11fnuz

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign for f8e4m3b11fnuz

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl FloatCore for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

fn infinity() -> Self

Returns positive infinity. Read more
Source§

fn neg_infinity() -> Self

Returns negative infinity. Read more
Source§

fn nan() -> Self

Returns NaN. Read more
Source§

fn neg_zero() -> Self

Returns -0.0. Read more
Source§

fn min_value() -> Self

Returns the smallest finite value that this type can represent. Read more
Source§

fn min_positive_value() -> Self

Returns the smallest positive, normalized value that this type can represent. Read more
Source§

fn epsilon() -> Self

Returns epsilon, a small positive value. Read more
Source§

fn max_value() -> Self

Returns the largest finite value that this type can represent. Read more
Source§

fn is_nan(self) -> bool

Returns true if the number is NaN. Read more
Source§

fn is_infinite(self) -> bool

Returns true if the number is infinite. Read more
Source§

fn is_finite(self) -> bool

Returns true if the number is neither infinite or NaN. Read more
Source§

fn is_normal(self) -> bool

Returns true if the number is neither zero, infinite, subnormal or NaN. Read more
Source§

fn classify(self) -> FpCategory

Returns the floating point category of the number. If only one property is going to be tested, it is generally faster to use the specific predicate instead. Read more
Source§

fn to_degrees(self) -> Self

Converts to degrees, assuming the number is in radians. Read more
Source§

fn to_radians(self) -> Self

Converts to radians, assuming the number is in degrees. Read more
Source§

fn integer_decode(self) -> (u64, i16, i8)

Returns the mantissa, base 2 exponent, and sign as integers, respectively. The original number can be recovered by sign * mantissa * 2 ^ exponent. Read more
Source§

fn is_subnormal(self) -> bool

Returns true if the number is subnormal. Read more
Source§

fn floor(self) -> Self

Returns the largest integer less than or equal to a number. Read more
Source§

fn ceil(self) -> Self

Returns the smallest integer greater than or equal to a number. Read more
Source§

fn round(self) -> Self

Returns the nearest integer to a number. Round half-way cases away from 0.0. Read more
Source§

fn trunc(self) -> Self

Return the integer part of a number. Read more
Source§

fn fract(self) -> Self

Returns the fractional part of a number. Read more
Source§

fn abs(self) -> Self

Computes the absolute value of self. Returns FloatCore::nan() if the number is FloatCore::nan(). Read more
Source§

fn signum(self) -> Self

Returns a number that represents the sign of self. Read more
Source§

fn is_sign_positive(self) -> bool

Returns true if self is positive, including +0.0 and FloatCore::infinity(), and FloatCore::nan(). Read more
Source§

fn is_sign_negative(self) -> bool

Returns true if self is negative, including -0.0 and FloatCore::neg_infinity(), and -FloatCore::nan(). Read more
Source§

fn min(self, other: Self) -> Self

Returns the minimum of the two numbers. Read more
Source§

fn max(self, other: Self) -> Self

Returns the maximum of the two numbers. Read more
Source§

fn clamp(self, min: Self, max: Self) -> Self

A value bounded by a minimum and a maximum Read more
Source§

fn recip(self) -> Self

Returns the reciprocal (multiplicative inverse) of the number. Read more
Source§

fn powi(self, exp: i32) -> Self

Raise a number to an integer power. Read more
Source§

impl FromPrimitive for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

impl FromStr for f8e4m3b11fnuz

Source§

type Err = <f32 as FromStr>::Err

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl LowerExp for f8e4m3b11fnuz

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Mul for f8e4m3b11fnuz

Source§

type Output = f8e4m3b11fnuz

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign for f8e4m3b11fnuz

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Neg for f8e4m3b11fnuz

Source§

type Output = f8e4m3b11fnuz

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Num for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

type FromStrRadixErr = <f32 as Num>::FromStrRadixErr

Source§

fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>

Convert from a string and radix (typically 2..=36). Read more
Source§

impl NumCast for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

fn from<T: ToPrimitive>(n: T) -> Option<Self>

Creates a number from another value that can be converted into a primitive via the ToPrimitive trait. If the source value cannot be represented by the target type, then None is returned. Read more
Source§

impl One for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl PartialEq for f8e4m3b11fnuz

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for f8e4m3b11fnuz

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a> Product<&'a f8e4m3b11fnuz> for f8e4m3b11fnuz

Source§

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Product for f8e4m3b11fnuz

Source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Rem for f8e4m3b11fnuz

Source§

type Output = f8e4m3b11fnuz

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl RemAssign for f8e4m3b11fnuz

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl SampleUniform for f8e4m3b11fnuz

Available on crate feature rand_distr only.
Source§

type Sampler = Float8E4M3B11FnuzSampler

The UniformSampler implementation supporting type X.
Source§

impl<S> Serialize<S> for f8e4m3b11fnuz
where S: Fallible + ?Sized,

Available on crate feature rkyv only.
Source§

fn serialize(&self, _: &mut S) -> Result<Self::Resolver, S::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl Serialize for f8e4m3b11fnuz

Available on crate feature serde only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Signed for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

fn abs(&self) -> Self

Computes the absolute value. Read more
Source§

fn abs_sub(&self, other: &Self) -> Self

The positive difference of two numbers. Read more
Source§

fn signum(&self) -> Self

Returns the sign of the number. Read more
Source§

fn is_positive(&self) -> bool

Returns true if the number is positive and false if the number is zero or negative.
Source§

fn is_negative(&self) -> bool

Returns true if the number is negative and false if the number is zero or positive.
Source§

impl Sub for f8e4m3b11fnuz

Source§

type Output = f8e4m3b11fnuz

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for f8e4m3b11fnuz

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<'a> Sum<&'a f8e4m3b11fnuz> for f8e4m3b11fnuz

Source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl Sum for f8e4m3b11fnuz

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl ToPrimitive for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
Source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
Source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
Source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
Source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
Source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
Source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
Source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
Source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
Source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
Source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
Source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
Source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Source§

impl UpperExp for f8e4m3b11fnuz

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Weight for f8e4m3b11fnuz

Available on crate feature rand_distr only.
Source§

const ZERO: Self = Self::ZERO

Representation of 0
Source§

fn checked_add_assign(&mut self, value: &Self) -> Result<(), ()>

Checked addition Read more
Source§

impl Zero for f8e4m3b11fnuz

Available on crate feature num-traits only.
Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl Zeroable for f8e4m3b11fnuz

Available on crate feature bytemuck only.
Source§

fn zeroed() -> Self

Source§

impl Copy for f8e4m3b11fnuz

Source§

impl NoUndef for f8e4m3b11fnuz

Available on crate feature rkyv only.
Source§

impl Pod for f8e4m3b11fnuz

Available on crate feature bytemuck only.
Source§

impl Portable for f8e4m3b11fnuz

Available on crate feature rkyv only.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> ArchiveUnsized for T
where T: Archive,

Source§

type Archived = <T as Archive>::Archived

The archived counterpart of this type. Unlike Archive, it may be unsized. Read more
Source§

fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata

Creates the archived version of the metadata for this value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

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

If this function returns true, then it must be valid to reinterpret bits as &Self.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T> LowerBounded for T
where T: Bounded,

Source§

fn min_value() -> T

Returns the smallest finite number this type can represent
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

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>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<Borrowed> SampleBorrow<Borrowed> for Borrowed
where Borrowed: SampleUniform,

Source§

fn borrow(&self) -> &Borrowed

Immutably borrows from an owned value. See Borrow::borrow
Source§

impl<T, S> SerializeUnsized<S> for T
where T: Serialize<S>, S: Fallible + Writer + ?Sized,

Source§

fn serialize_unsized( &self, serializer: &mut S, ) -> Result<usize, <S as Fallible>::Error>

Writes the object and returns the position of the archived type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UpperBounded for T
where T: Bounded,

Source§

fn max_value() -> T

Returns the largest finite number this type can represent
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> NoUninit for T
where T: Pod,

Source§

impl<T> NumAssign for T
where T: Num + NumAssignOps,

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,