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§
Sourcefn acosh(self) -> Self
fn acosh(self) -> Self
See f64::acosh.
Sourcefn asinh(self) -> Self
fn asinh(self) -> Self
See f64::asinh.
Sourcefn atan2(self, rhs: Self) -> Self
fn atan2(self, rhs: Self) -> Self
See f64::atan2.
Sourcefn atanh(self) -> Self
fn atanh(self) -> Self
See f64::atanh.
Sourcefn div_euclid(self, rhs: Self) -> Self
fn div_euclid(self, rhs: Self) -> Self
See f64::div_euclid.
Sourcefn exp_m1(self) -> Self
fn exp_m1(self) -> Self
See f64::exp_m1.
Sourcefn floor(self) -> Self
fn floor(self) -> Self
See f64::floor.
Sourcefn fract(self) -> Self
fn fract(self) -> Self
See f64::fract.
Sourcefn hypot(self, rhs: Self) -> Self
fn hypot(self, rhs: Self) -> Self
See f64::hypot.
Sourcefn ln_1p(self) -> Self
fn ln_1p(self) -> Self
See f64::ln_1p.
Sourcefn log10(self) -> Self
fn log10(self) -> Self
See f64::log10.
Sourcefn mul_add(self, mul: Self, add: Self) -> Self
fn mul_add(self, mul: Self, add: Self) -> Self
See f64::mul_add.
Sourcefn rem_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
See f64::rem_euclid.
Sourcefn round_ties_even(self) -> Self
fn round_ties_even(self) -> Self
See f64::round_ties_even.
Sourcefn round(self) -> Self
fn round(self) -> Self
See f64::round.
Sourcefn sin_cos(self) -> (Self, Self)
fn sin_cos(self) -> (Self, Self)
See f64::sin_cos.
Sourcefn trunc(self) -> Self
fn trunc(self) -> Self
See f64::trunc.
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.
impl StdFloatingPoint for f16
Available on crate feature
f16 only.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
Source§impl StdFloatingPoint for f32
impl StdFloatingPoint for f32
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
Source§impl StdFloatingPoint for f64
impl StdFloatingPoint for f64
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
Source§impl StdFloatingPoint for f128
Available on crate feature f128 only.
impl StdFloatingPoint for f128
Available on crate feature
f128 only.