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::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::ExpandType

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Float for f32

Source§

const DIGITS: u32 = f32::DIGITS

Source§

const EPSILON: f32 = f32::EPSILON

Source§

const INFINITY: f32 = 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: f32 = f32::MIN_POSITIVE

Source§

const NAN: f32 = f32::NAN

Source§

const NEG_INFINITY: f32 = f32::NEG_INFINITY

Source§

const RADIX: u32 = f32::RADIX

Source§

fn new(val: f32) -> f32

Source§

impl Float for f64

Source§

const DIGITS: u32 = f64::DIGITS

Source§

const EPSILON: f64 = f64::EPSILON

Source§

const INFINITY: f64 = 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: f64 = f64::MIN_POSITIVE

Source§

const NAN: f64 = f64::NAN

Source§

const NEG_INFINITY: f64 = f64::NEG_INFINITY

Source§

const RADIX: u32 = f64::RADIX

Source§

fn new(val: f32) -> f64

Source§

impl Float for bf16

Source§

const DIGITS: u32 = bf16::DIGITS

Source§

const EPSILON: bf16 = bf16::EPSILON

Source§

const INFINITY: bf16 = 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: bf16 = bf16::MIN_POSITIVE

Source§

const NAN: bf16 = bf16::NAN

Source§

const NEG_INFINITY: bf16 = bf16::NEG_INFINITY

Source§

const RADIX: u32 = bf16::RADIX

Source§

fn new(val: f32) -> bf16

Source§

impl Float for f16

Source§

const DIGITS: u32 = f16::DIGITS

Source§

const EPSILON: f16 = f16::EPSILON

Source§

const INFINITY: f16 = 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: f16 = f16::MIN_POSITIVE

Source§

const NAN: f16 = f16::NAN

Source§

const NEG_INFINITY: f16 = f16::NEG_INFINITY

Source§

const RADIX: u32 = f16::RADIX

Source§

fn new(val: f32) -> f16

Implementors§

Source§

impl Float for flex32

Source§

const DIGITS: u32 = 32

Source§

const EPSILON: flex32

Source§

const INFINITY: flex32

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: flex32

Source§

const NAN: flex32

Source§

const NEG_INFINITY: flex32

Source§

const RADIX: u32 = 2

Source§

impl Float for tf32

Source§

impl<Marker> Float for DynamicScalar<Marker>
where Marker: 'static,

Source§

const DIGITS: u32 = 32

Source§

const EPSILON: DynamicScalar<Marker>

Source§

const INFINITY: DynamicScalar<Marker>

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: DynamicScalar<Marker>

Source§

const NAN: DynamicScalar<Marker>

Source§

const NEG_INFINITY: DynamicScalar<Marker>

Source§

const RADIX: u32 = 2