Skip to main content

Float

Trait Float 

Source
pub trait Float:
    Numeric
    + FloatOps
    + Exp
    + Log
    + Log1p
    + Cos
    + Sin
    + Tan
    + Tanh
    + Sinh
    + Cosh
    + ArcCos
    + ArcSin
    + ArcTan
    + ArcSinh
    + ArcCosh
    + ArcTanh
    + Degrees
    + Radians
    + ArcTan2
    + Powf
    + Powi<i32>
    + Hypot
    + Rhypot
    + Sqrt
    + InverseSqrt
    + Round
    + Floor
    + Ceil
    + Trunc
    + Erf
    + Recip
    + Magnitude
    + Normalize
    + Dot
    + IsNan
    + IsInf
    + Into<Self::ExpandType>
    + Neg<Output = Self>
    + PartialOrd
    + PartialEq {
    const DIGITS: u32;
    const EPSILON: Self;
    const INFINITY: Self;
    const MANTISSA_DIGITS: u32;
    const MAX_10_EXP: i32;
    const MAX_EXP: i32;
    const MIN_10_EXP: i32;
    const MIN_EXP: i32;
    const MIN_POSITIVE: Self;
    const NAN: Self;
    const NEG_INFINITY: Self;
    const RADIX: u32;

    // Required method
    fn new(val: f32) -> Self;

    // Provided method
    fn __expand_new(
        scope: &mut Scope,
        val: f32,
    ) -> <Self as CubeType>::ExpandType { ... }
}
Expand description

Floating point numbers. Used as input in float kernels

Required Associated Constants§

Required Methods§

Source

fn new(val: f32) -> Self

Provided Methods§

Source

fn __expand_new(scope: &mut Scope, val: f32) -> <Self as CubeType>::ExpandType

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Float for f32

Source§

const DIGITS: u32 = f32::DIGITS

Source§

const EPSILON: Self = f32::EPSILON

Source§

const INFINITY: Self = f32::INFINITY

Source§

const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS

Source§

const MAX_10_EXP: i32 = f32::MAX_10_EXP

Source§

const MAX_EXP: i32 = f32::MAX_EXP

Source§

const MIN_10_EXP: i32 = f32::MIN_10_EXP

Source§

const MIN_EXP: i32 = f32::MIN_EXP

Source§

const MIN_POSITIVE: Self = f32::MIN_POSITIVE

Source§

const NAN: Self = f32::NAN

Source§

const NEG_INFINITY: Self = f32::NEG_INFINITY

Source§

const RADIX: u32 = f32::RADIX

Source§

fn new(val: f32) -> Self

Source§

impl Float for f64

Source§

const DIGITS: u32 = f64::DIGITS

Source§

const EPSILON: Self = f64::EPSILON

Source§

const INFINITY: Self = f64::INFINITY

Source§

const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS

Source§

const MAX_10_EXP: i32 = f64::MAX_10_EXP

Source§

const MAX_EXP: i32 = f64::MAX_EXP

Source§

const MIN_10_EXP: i32 = f64::MIN_10_EXP

Source§

const MIN_EXP: i32 = f64::MIN_EXP

Source§

const MIN_POSITIVE: Self = f64::MIN_POSITIVE

Source§

const NAN: Self = f64::NAN

Source§

const NEG_INFINITY: Self = f64::NEG_INFINITY

Source§

const RADIX: u32 = f64::RADIX

Source§

fn new(val: f32) -> Self

Source§

impl Float for bf16

Source§

const DIGITS: u32 = bf16::DIGITS

Source§

const EPSILON: Self = bf16::EPSILON

Source§

const INFINITY: Self = bf16::INFINITY

Source§

const MANTISSA_DIGITS: u32 = bf16::MANTISSA_DIGITS

Source§

const MAX_10_EXP: i32 = bf16::MAX_10_EXP

Source§

const MAX_EXP: i32 = bf16::MAX_EXP

Source§

const MIN_10_EXP: i32 = bf16::MIN_10_EXP

Source§

const MIN_EXP: i32 = bf16::MIN_EXP

Source§

const MIN_POSITIVE: Self = bf16::MIN_POSITIVE

Source§

const NAN: Self = bf16::NAN

Source§

const NEG_INFINITY: Self = bf16::NEG_INFINITY

Source§

const RADIX: u32 = bf16::RADIX

Source§

fn new(val: f32) -> Self

Source§

impl Float for f16

Source§

const DIGITS: u32 = f16::DIGITS

Source§

const EPSILON: Self = f16::EPSILON

Source§

const INFINITY: Self = f16::INFINITY

Source§

const MANTISSA_DIGITS: u32 = f16::MANTISSA_DIGITS

Source§

const MAX_10_EXP: i32 = f16::MAX_10_EXP

Source§

const MAX_EXP: i32 = f16::MAX_EXP

Source§

const MIN_10_EXP: i32 = f16::MIN_10_EXP

Source§

const MIN_EXP: i32 = f16::MIN_EXP

Source§

const MIN_POSITIVE: Self = f16::MIN_POSITIVE

Source§

const NAN: Self = f16::NAN

Source§

const NEG_INFINITY: Self = f16::NEG_INFINITY

Source§

const RADIX: u32 = f16::RADIX

Source§

fn new(val: f32) -> Self

Implementors§

Source§

impl Float for flex32

Source§

const DIGITS: u32 = 32

Source§

const EPSILON: Self

Source§

const INFINITY: Self

Source§

const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS

Source§

const MAX_10_EXP: i32 = f32::MAX_10_EXP

Source§

const MAX_EXP: i32 = f32::MAX_EXP

Source§

const MIN_10_EXP: i32 = f32::MIN_10_EXP

Source§

const MIN_EXP: i32 = f32::MIN_EXP

Source§

const MIN_POSITIVE: Self

Source§

const NAN: Self

Source§

const NEG_INFINITY: Self

Source§

const RADIX: u32 = 2

Source§

impl Float for tf32

Source§

const DIGITS: u32 = 32

Source§

const EPSILON: Self

Source§

const INFINITY: Self

Source§

const MANTISSA_DIGITS: u32 = 10

Source§

const MAX_10_EXP: i32 = 38

Source§

const MAX_EXP: i32 = 128

Source§

const MIN_10_EXP: i32 = -37

Source§

const MIN_EXP: i32 = -125

Source§

const MIN_POSITIVE: Self

Source§

const NAN: Self

Source§

const NEG_INFINITY: Self

Source§

const RADIX: u32 = 2

Source§

impl<const POS: u8> Float for ElemExpand<POS>

Source§

const DIGITS: u32 = 32

Source§

const EPSILON: Self

Source§

const INFINITY: Self

Source§

const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS

Source§

const MAX_10_EXP: i32 = f32::MAX_10_EXP

Source§

const MAX_EXP: i32 = f32::MAX_EXP

Source§

const MIN_10_EXP: i32 = f32::MIN_10_EXP

Source§

const MIN_EXP: i32 = f32::MIN_EXP

Source§

const MIN_POSITIVE: Self

Source§

const NAN: Self

Source§

const NEG_INFINITY: Self

Source§

const RADIX: u32 = 2