Skip to main content

StdFloatingPoint

Trait StdFloatingPoint 

Source
pub unsafe trait StdFloatingPoint: FloatingPoint {
Show 36 methods // Required methods fn acos(self) -> Self; fn acosh(self) -> Self; fn asin(self) -> Self; fn asinh(self) -> Self; fn atan(self) -> Self; fn atan2(self, rhs: Self) -> Self; fn atanh(self) -> Self; fn cbrt(self) -> Self; fn ceil(self) -> Self; fn cos(self) -> Self; fn cosh(self) -> Self; fn div_euclid(self, rhs: Self) -> Self; fn exp_m1(self) -> Self; fn exp(self) -> Self; fn exp2(self) -> Self; fn floor(self) -> Self; fn fract(self) -> Self; fn hypot(self, rhs: Self) -> Self; fn ln(self) -> Self; fn ln_1p(self) -> Self; fn log(self, rhs: Self) -> Self; fn log10(self) -> Self; fn log2(self) -> Self; fn mul_add(self, mul: Self, add: Self) -> Self; fn powf(self, rhs: Self) -> Self; fn powi(self, rhs: i32) -> Self; fn rem_euclid(self, rhs: Self) -> Self; fn round_ties_even(self) -> Self; fn round(self) -> Self; fn sin(self) -> Self; fn sin_cos(self) -> (Self, Self); fn sinh(self) -> Self; fn sqrt(self) -> Self; fn tan(self) -> Self; fn tanh(self) -> Self; fn trunc(self) -> Self;
}
Available on crate feature std only.
Expand description

Extends FloatingPoint with std-only functionality.

Note that as core_float_math stabilises (see #137578), users of this trait should prepare for its deprecation.

§Safety

All items must behave to the same specifications as the standard items.

Required Methods§

Source

fn acos(self) -> Self

See f64::acos.

Source

fn acosh(self) -> Self

Source

fn asin(self) -> Self

See f64::asin.

Source

fn asinh(self) -> Self

Source

fn atan(self) -> Self

See f64::atan.

Source

fn atan2(self, rhs: Self) -> Self

Source

fn atanh(self) -> Self

Source

fn cbrt(self) -> Self

See f64::cbrt.

Source

fn ceil(self) -> Self

See f64::ceil.

Source

fn cos(self) -> Self

See f64::cos.

Source

fn cosh(self) -> Self

See f64::cosh.

Source

fn div_euclid(self, rhs: Self) -> Self

Source

fn exp_m1(self) -> Self

Source

fn exp(self) -> Self

See f64::exp.

Source

fn exp2(self) -> Self

See f64::exp2.

Source

fn floor(self) -> Self

Source

fn fract(self) -> Self

Source

fn hypot(self, rhs: Self) -> Self

Source

fn ln(self) -> Self

See f64::ln.

Source

fn ln_1p(self) -> Self

Source

fn log(self, rhs: Self) -> Self

See f64::log.

Source

fn log10(self) -> Self

Source

fn log2(self) -> Self

See f64::log2.

Source

fn mul_add(self, mul: Self, add: Self) -> Self

Source

fn powf(self, rhs: Self) -> Self

See f64::powf.

Source

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

See f64::powi.

Source

fn rem_euclid(self, rhs: Self) -> Self

Source

fn round_ties_even(self) -> Self

Source

fn round(self) -> Self

Source

fn sin(self) -> Self

See f64::sin.

Source

fn sin_cos(self) -> (Self, Self)

Source

fn sinh(self) -> Self

See f64::sinh.

Source

fn sqrt(self) -> Self

See f64::sqrt.

Source

fn tan(self) -> Self

See f64::tan.

Source

fn tanh(self) -> Self

See f64::tanh.

Source

fn trunc(self) -> Self

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 StdFloatingPoint for f16

Available on crate feature f16 only.
Source§

fn acos(self) -> Self

Source§

fn acosh(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn asinh(self) -> Self

Source§

fn atan(self) -> Self

Source§

fn atan2(self, rhs: Self) -> Self

Source§

fn atanh(self) -> Self

Source§

fn cbrt(self) -> Self

Source§

fn ceil(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn cosh(self) -> Self

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn exp_m1(self) -> Self

Source§

fn exp(self) -> Self

Source§

fn exp2(self) -> Self

Source§

fn floor(self) -> Self

Source§

fn fract(self) -> Self

Source§

fn hypot(self, rhs: Self) -> Self

Source§

fn ln(self) -> Self

Source§

fn ln_1p(self) -> Self

Source§

fn log(self, rhs: Self) -> Self

Source§

fn log10(self) -> Self

Source§

fn log2(self) -> Self

Source§

fn mul_add(self, mul: Self, add: Self) -> Self

Source§

fn powf(self, rhs: Self) -> Self

Source§

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

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

fn round_ties_even(self) -> Self

Source§

fn round(self) -> Self

Source§

fn sin(self) -> Self

Source§

fn sin_cos(self) -> (Self, Self)

Source§

fn sinh(self) -> Self

Source§

fn sqrt(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn tanh(self) -> Self

Source§

fn trunc(self) -> Self

Source§

impl StdFloatingPoint for f32

Source§

fn acos(self) -> Self

Source§

fn acosh(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn asinh(self) -> Self

Source§

fn atan(self) -> Self

Source§

fn atan2(self, rhs: Self) -> Self

Source§

fn atanh(self) -> Self

Source§

fn cbrt(self) -> Self

Source§

fn ceil(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn cosh(self) -> Self

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn exp_m1(self) -> Self

Source§

fn exp(self) -> Self

Source§

fn exp2(self) -> Self

Source§

fn floor(self) -> Self

Source§

fn fract(self) -> Self

Source§

fn hypot(self, rhs: Self) -> Self

Source§

fn ln(self) -> Self

Source§

fn ln_1p(self) -> Self

Source§

fn log(self, rhs: Self) -> Self

Source§

fn log10(self) -> Self

Source§

fn log2(self) -> Self

Source§

fn mul_add(self, mul: Self, add: Self) -> Self

Source§

fn powf(self, rhs: Self) -> Self

Source§

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

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

fn round_ties_even(self) -> Self

Source§

fn round(self) -> Self

Source§

fn sin(self) -> Self

Source§

fn sin_cos(self) -> (Self, Self)

Source§

fn sinh(self) -> Self

Source§

fn sqrt(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn tanh(self) -> Self

Source§

fn trunc(self) -> Self

Source§

impl StdFloatingPoint for f64

Source§

fn acos(self) -> Self

Source§

fn acosh(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn asinh(self) -> Self

Source§

fn atan(self) -> Self

Source§

fn atan2(self, rhs: Self) -> Self

Source§

fn atanh(self) -> Self

Source§

fn cbrt(self) -> Self

Source§

fn ceil(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn cosh(self) -> Self

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn exp_m1(self) -> Self

Source§

fn exp(self) -> Self

Source§

fn exp2(self) -> Self

Source§

fn floor(self) -> Self

Source§

fn fract(self) -> Self

Source§

fn hypot(self, rhs: Self) -> Self

Source§

fn ln(self) -> Self

Source§

fn ln_1p(self) -> Self

Source§

fn log(self, rhs: Self) -> Self

Source§

fn log10(self) -> Self

Source§

fn log2(self) -> Self

Source§

fn mul_add(self, mul: Self, add: Self) -> Self

Source§

fn powf(self, rhs: Self) -> Self

Source§

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

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

fn round_ties_even(self) -> Self

Source§

fn round(self) -> Self

Source§

fn sin(self) -> Self

Source§

fn sin_cos(self) -> (Self, Self)

Source§

fn sinh(self) -> Self

Source§

fn sqrt(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn tanh(self) -> Self

Source§

fn trunc(self) -> Self

Source§

impl StdFloatingPoint for f128

Available on crate feature f128 only.
Source§

fn acos(self) -> Self

Source§

fn acosh(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn asinh(self) -> Self

Source§

fn atan(self) -> Self

Source§

fn atan2(self, rhs: Self) -> Self

Source§

fn atanh(self) -> Self

Source§

fn cbrt(self) -> Self

Source§

fn ceil(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn cosh(self) -> Self

Source§

fn div_euclid(self, rhs: Self) -> Self

Source§

fn exp_m1(self) -> Self

Source§

fn exp(self) -> Self

Source§

fn exp2(self) -> Self

Source§

fn floor(self) -> Self

Source§

fn fract(self) -> Self

Source§

fn hypot(self, rhs: Self) -> Self

Source§

fn ln(self) -> Self

Source§

fn ln_1p(self) -> Self

Source§

fn log(self, rhs: Self) -> Self

Source§

fn log10(self) -> Self

Source§

fn log2(self) -> Self

Source§

fn mul_add(self, mul: Self, add: Self) -> Self

Source§

fn powf(self, rhs: Self) -> Self

Source§

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

Source§

fn rem_euclid(self, rhs: Self) -> Self

Source§

fn round_ties_even(self) -> Self

Source§

fn round(self) -> Self

Source§

fn sin(self) -> Self

Source§

fn sin_cos(self) -> (Self, Self)

Source§

fn sinh(self) -> Self

Source§

fn sqrt(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn tanh(self) -> Self

Source§

fn trunc(self) -> Self

Implementors§