PrimitiveFloat

Trait PrimitiveFloat 

Source
pub trait PrimitiveFloat:
    PrimitiveNumber
    + PrimitiveFloatToInt<i8>
    + PrimitiveFloatToInt<i16>
    + PrimitiveFloatToInt<i32>
    + PrimitiveFloatToInt<i64>
    + PrimitiveFloatToInt<i128>
    + PrimitiveFloatToInt<isize>
    + PrimitiveFloatToInt<u8>
    + PrimitiveFloatToInt<u16>
    + PrimitiveFloatToInt<u32>
    + PrimitiveFloatToInt<u64>
    + PrimitiveFloatToInt<u128>
    + PrimitiveFloatToInt<usize>
    + From<i8>
    + From<u8>
    + Neg<Output = Self>
    + FromStr<Err = ParseFloatError> {
    type Bits: PrimitiveUnsigned;
Show 33 associated constants and 59 methods const DIGITS: u32; const EPSILON: Self; const INFINITY: Self; const MANTISSA_DIGITS: u32; const MAX: Self; const MAX_10_EXP: i32; const MAX_EXP: i32; const MIN: Self; const MIN_10_EXP: i32; const MIN_EXP: i32; const MIN_POSITIVE: Self; const NAN: Self; const NEG_INFINITY: Self; const RADIX: u32; const E: Self; const FRAC_1_PI: Self; const FRAC_1_SQRT_2: Self; const FRAC_2_PI: Self; const FRAC_2_SQRT_PI: Self; const FRAC_PI_2: Self; const FRAC_PI_3: Self; const FRAC_PI_4: Self; const FRAC_PI_6: Self; const FRAC_PI_8: Self; const LN_2: Self; const LN_10: Self; const LOG2_10: Self; const LOG2_E: Self; const LOG10_2: Self; const LOG10_E: Self; const PI: Self; const SQRT_2: Self; const TAU: Self; // Required methods fn abs(self) -> Self; fn clamp(self, min: Self, max: Self) -> Self; fn classify(self) -> FpCategory; fn copysign(self, sign: Self) -> Self; fn from_bits(value: Self::Bits) -> Self; fn is_finite(self) -> bool; fn is_infinite(self) -> bool; fn is_nan(self) -> bool; fn is_normal(self) -> bool; fn is_sign_negative(self) -> bool; fn is_sign_positive(self) -> bool; fn is_subnormal(self) -> bool; fn max(self, other: Self) -> Self; fn min(self, other: Self) -> Self; fn next_down(self) -> Self; fn next_up(self) -> Self; fn recip(self) -> Self; fn signum(self) -> Self; fn to_bits(self) -> Self::Bits; fn to_degrees(self) -> Self; fn to_radians(self) -> Self; fn total_cmp(&self, other: &Self) -> Ordering; unsafe fn to_int_unchecked<Int>(self) -> Int where Self: PrimitiveFloatToInt<Int>; fn acos(self) -> Self; fn acosh(self) -> Self; fn asin(self) -> Self; fn asinh(self) -> Self; fn atan(self) -> Self; fn atan2(self, other: 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(self) -> Self; fn exp2(self) -> Self; fn exp_m1(self) -> Self; fn floor(self) -> Self; fn fract(self) -> Self; fn hypot(self, other: Self) -> Self; fn ln(self) -> Self; fn ln_1p(self) -> Self; fn log(self, base: Self) -> Self; fn log2(self) -> Self; fn log10(self) -> Self; fn mul_add(self, a: Self, b: Self) -> Self; fn powf(self, n: Self) -> Self; fn powi(self, n: i32) -> Self; fn rem_euclid(self, rhs: Self) -> Self; fn round(self) -> Self; fn round_ties_even(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;
}
Expand description

Trait for all primitive floating-point types, including the supertrait PrimitiveNumber.

This encapsulates trait implementations, constants, and inherent methods that are common among the primitive floating-point types, f32 and f64. Unstable types f16 and f128 will be added once they are stabilized.

See the corresponding items on the individual types for more documentation and examples.

This trait is sealed with a private trait to prevent downstream implementations, so we may continue to expand along with the standard library without worrying about breaking changes for implementors.

§Examples

This example requires the std feature for powi and sqrt:

use num_primitive::PrimitiveFloat;

// Euclidean distance, √(∑(aᵢ - bᵢ)²)
fn distance<T: PrimitiveFloat>(a: &[T], b: &[T]) -> T {
    assert_eq!(a.len(), b.len());
    core::iter::zip(a, b).map(|(a, b)| (*a - b).powi(2)).sum::<T>().sqrt()
}

assert_eq!(distance::<f32>(&[0., 0.], &[3., 4.]), 5.);
assert_eq!(distance::<f64>(&[0., 1., 2.], &[1., 3., 0.]), 3.);

This example works without any features:

use num_primitive::PrimitiveFloat;

// Squared Euclidean distance, ∑(aᵢ - bᵢ)²
fn distance_squared<T: PrimitiveFloat>(a: &[T], b: &[T]) -> T {
    assert_eq!(a.len(), b.len());
    core::iter::zip(a, b).map(|(a, b)| (*a - b)).map(|x| x * x).sum::<T>()
}

assert_eq!(distance_squared::<f32>(&[0., 0.], &[3., 4.]), 25.);
assert_eq!(distance_squared::<f64>(&[0., 1., 2.], &[1., 3., 0.]), 9.);

Required Associated Constants§

Source

const DIGITS: u32

Approximate number of significant digits in base 10.

Source

const EPSILON: Self

Machine epsilon value.

Source

const INFINITY: Self

Infinity (∞).

Source

const MANTISSA_DIGITS: u32

Number of significant digits in base 2.

Source

const MAX: Self

Largest finite value.

Source

const MAX_10_EXP: i32

Maximum x for which 10x is normal.

Source

const MAX_EXP: i32

Maximum possible power of 2 exponent.

Source

const MIN: Self

Smallest finite value.

Source

const MIN_10_EXP: i32

Minimum x for which 10x is normal.

Source

const MIN_EXP: i32

One greater than the minimum possible normal power of 2 exponent.

Source

const MIN_POSITIVE: Self

Smallest positive normal value.

Source

const NAN: Self

Not a Number (NaN).

Source

const NEG_INFINITY: Self

Negative infinity (−∞).

Source

const RADIX: u32

The radix or base of the internal representation.

Source

const E: Self

Euler’s number (e)

Source

const FRAC_1_PI: Self

1/π

Source

const FRAC_1_SQRT_2: Self

1/sqrt(2)

Source

const FRAC_2_PI: Self

2/π

Source

const FRAC_2_SQRT_PI: Self

2/sqrt(π)

Source

const FRAC_PI_2: Self

π/2

Source

const FRAC_PI_3: Self

π/3

Source

const FRAC_PI_4: Self

π/4

Source

const FRAC_PI_6: Self

π/6

Source

const FRAC_PI_8: Self

π/8

Source

const LN_2: Self

ln(2)

Source

const LN_10: Self

ln(10)

Source

const LOG2_10: Self

log₂(10)

Source

const LOG2_E: Self

log₂(e)

Source

const LOG10_2: Self

log₁₀(2)

Source

const LOG10_E: Self

log₁₀(e)

Source

const PI: Self

Archimedes’ constant (π)

Source

const SQRT_2: Self

sqrt(2)

Source

const TAU: Self

The full circle constant (τ)

Required Associated Types§

Source

type Bits: PrimitiveUnsigned

An unsigned integer type used by methods from_bits and to_bits.

Required Methods§

Source

fn abs(self) -> Self

Computes the absolute value of self.

Source

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

Restrict a value to a certain interval unless it is NaN.

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.

Source

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

Returns a number composed of the magnitude of self and the sign of sign.

Source

fn from_bits(value: Self::Bits) -> Self

Raw transmutation from Self::Bits.

Source

fn is_finite(self) -> bool

Returns true if this number is neither infinite nor NaN.

Source

fn is_infinite(self) -> bool

Returns true if this value is positive infinity or negative infinity.

Source

fn is_nan(self) -> bool

Returns true if this value is NaN.

Source

fn is_normal(self) -> bool

Returns true if the number is neither zero, infinite, subnormal, or NaN.

Source

fn is_sign_negative(self) -> bool

Returns true if self has a negative sign, including -0.0, NaNs with negative sign bit and negative infinity.

Source

fn is_sign_positive(self) -> bool

Returns true if self has a positive sign, including +0.0, NaNs with positive sign bit and positive infinity.

Source

fn is_subnormal(self) -> bool

Returns true if the number is subnormal.

Source

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

Returns the maximum of the two numbers, ignoring NaN.

Source

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

Returns the minimum of the two numbers, ignoring NaN.

Source

fn next_down(self) -> Self

Returns the greatest number less than self.

Source

fn next_up(self) -> Self

Returns the least number greater than self.

Source

fn recip(self) -> Self

Takes the reciprocal (inverse) of a number, 1/x.

Source

fn signum(self) -> Self

Returns a number that represents the sign of self.

Source

fn to_bits(self) -> Self::Bits

Raw transmutation to Self::Bits.

Source

fn to_degrees(self) -> Self

Converts radians to degrees.

Source

fn to_radians(self) -> Self

Converts degrees to radians.

Source

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

Returns the ordering between self and other.

Source

unsafe fn to_int_unchecked<Int>(self) -> Int
where Self: PrimitiveFloatToInt<Int>,

Rounds toward zero and converts to any primitive integer type, assuming that the value is finite and fits in that type.

§Safety

The value must:

  • Not be NaN
  • Not be infinite
  • Be representable in the return type Int, after truncating off its fractional part
Source

fn acos(self) -> Self

Available on crate feature std only.

Computes the arccosine of a number. Return value is in radians in the range [0, pi] or NaN if the number is outside the range [-1, 1].

Source

fn acosh(self) -> Self

Available on crate feature std only.

Inverse hyperbolic cosine function.

Source

fn asin(self) -> Self

Available on crate feature std only.

Computes the arcsine of a number. Return value is in radians in the range [-pi/2, pi/2] or NaN if the number is outside the range [-1, 1].

Source

fn asinh(self) -> Self

Available on crate feature std only.

Inverse hyperbolic sine function.

Source

fn atan(self) -> Self

Available on crate feature std only.

Computes the arctangent of a number. Return value is in radians in the range [-pi/2, pi/2];

Source

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

Available on crate feature std only.

Computes the four quadrant arctangent of self (y) and other (x) in radians.

Source

fn atanh(self) -> Self

Available on crate feature std only.

Inverse hyperbolic tangent function.

Source

fn cbrt(self) -> Self

Available on crate feature std only.

Returns the cube root of a number.

Source

fn ceil(self) -> Self

Available on crate feature std only.

Returns the smallest integer greater than or equal to self.

Source

fn cos(self) -> Self

Available on crate feature std only.

Computes the cosine of a number (in radians).

Source

fn cosh(self) -> Self

Available on crate feature std only.

Hyperbolic cosine function.

Source

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

Available on crate feature std only.

Calculates Euclidean division, the matching method for rem_euclid.

Source

fn exp(self) -> Self

Available on crate feature std only.

Returns e^(self), (the exponential function).

Source

fn exp2(self) -> Self

Available on crate feature std only.

Returns 2^(self).

Source

fn exp_m1(self) -> Self

Available on crate feature std only.

Returns e^(self) - 1 in a way that is accurate even if the number is close to zero.

Source

fn floor(self) -> Self

Available on crate feature std only.

Returns the largest integer less than or equal to self.

Source

fn fract(self) -> Self

Available on crate feature std only.

Returns the fractional part of self.

Source

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

Available on crate feature std only.

Compute the distance between the origin and a point (x, y) on the Euclidean plane. Equivalently, compute the length of the hypotenuse of a right-angle triangle with other sides having length x.abs() and y.abs().

Source

fn ln(self) -> Self

Available on crate feature std only.

Returns the natural logarithm of the number.

Source

fn ln_1p(self) -> Self

Available on crate feature std only.

Returns ln(1+n) (natural logarithm) more accurately than if the operations were performed separately.

Source

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

Available on crate feature std only.

Returns the logarithm of the number with respect to an arbitrary base.

Source

fn log2(self) -> Self

Available on crate feature std only.

Returns the base 2 logarithm of the number.

Source

fn log10(self) -> Self

Available on crate feature std only.

Returns the base 10 logarithm of the number.

Source

fn mul_add(self, a: Self, b: Self) -> Self

Available on crate feature std only.

Fused multiply-add. Computes (self * a) + b with only one rounding error, yielding a more accurate result than an unfused multiply-add.

Source

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

Available on crate feature std only.

Raises a number to a floating point power.

Source

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

Available on crate feature std only.

Raises a number to an integer power.

Source

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

Available on crate feature std only.

Calculates the least nonnegative remainder of self (mod rhs).

Source

fn round(self) -> Self

Available on crate feature std only.

Returns the nearest integer to self. If a value is half-way between two integers, round away from 0.0.

Source

fn round_ties_even(self) -> Self

Available on crate feature std only.

Returns the nearest integer to a number. Rounds half-way cases to the number with an even least significant digit.

Source

fn sin(self) -> Self

Available on crate feature std only.

Computes the sine of a number (in radians).

Source

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

Available on crate feature std only.

Simultaneously computes the sine and cosine of the number, x. Returns (sin(x), cos(x)).

Source

fn sinh(self) -> Self

Available on crate feature std only.

Hyperbolic sine function.

Source

fn sqrt(self) -> Self

Available on crate feature std only.

Returns the square root of a number.

Source

fn tan(self) -> Self

Available on crate feature std only.

Computes the tangent of a number (in radians).

Source

fn tanh(self) -> Self

Available on crate feature std only.

Hyperbolic tangent function.

Source

fn trunc(self) -> Self

Available on crate feature std only.

Returns the integer part of self. This means that non-integer numbers are always truncated towards zero.

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 PrimitiveFloat for f32

Source§

fn from_bits(value: Self::Bits) -> Self

See the inherent from_bits method.

Source§

fn abs(self) -> Self

See the inherent abs method.

Source§

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

See the inherent clamp method.

Source§

fn classify(self) -> FpCategory

See the inherent classify method.

Source§

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

See the inherent copysign method.

Source§

fn is_finite(self) -> bool

See the inherent is_finite method.

Source§

fn is_infinite(self) -> bool

See the inherent is_infinite method.

Source§

fn is_nan(self) -> bool

See the inherent is_nan method.

Source§

fn is_normal(self) -> bool

See the inherent is_normal method.

Source§

fn is_sign_negative(self) -> bool

See the inherent is_sign_negative method.

Source§

fn is_sign_positive(self) -> bool

See the inherent is_sign_positive method.

Source§

fn is_subnormal(self) -> bool

See the inherent is_subnormal method.

Source§

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

See the inherent max method.

Source§

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

See the inherent min method.

Source§

fn next_down(self) -> Self

See the inherent next_down method.

Source§

fn next_up(self) -> Self

See the inherent next_up method.

Source§

fn recip(self) -> Self

See the inherent recip method.

Source§

fn signum(self) -> Self

See the inherent signum method.

Source§

fn to_bits(self) -> Self::Bits

See the inherent to_bits method.

Source§

fn to_degrees(self) -> Self

See the inherent to_degrees method.

Source§

fn to_radians(self) -> Self

See the inherent to_radians method.

Source§

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

See the inherent total_cmp method.

Source§

unsafe fn to_int_unchecked<Int>(self) -> Int
where Self: PrimitiveFloatToInt<Int>,

See the inherent to_int_unchecked method.

Source§

fn acos(self) -> Self

Available on crate feature std only.

See the inherent acos method.

Source§

fn acosh(self) -> Self

Available on crate feature std only.

See the inherent acosh method.

Source§

fn asin(self) -> Self

Available on crate feature std only.

See the inherent asin method.

Source§

fn asinh(self) -> Self

Available on crate feature std only.

See the inherent asinh method.

Source§

fn atan(self) -> Self

Available on crate feature std only.

See the inherent atan method.

Source§

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

Available on crate feature std only.

See the inherent atan2 method.

Source§

fn atanh(self) -> Self

Available on crate feature std only.

See the inherent atanh method.

Source§

fn cbrt(self) -> Self

Available on crate feature std only.

See the inherent cbrt method.

Source§

fn ceil(self) -> Self

Available on crate feature std only.

See the inherent ceil method.

Source§

fn cos(self) -> Self

Available on crate feature std only.

See the inherent cos method.

Source§

fn cosh(self) -> Self

Available on crate feature std only.

See the inherent cosh method.

Source§

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

Available on crate feature std only.

See the inherent div_euclid method.

Source§

fn exp(self) -> Self

Available on crate feature std only.

See the inherent exp method.

Source§

fn exp2(self) -> Self

Available on crate feature std only.

See the inherent exp2 method.

Source§

fn exp_m1(self) -> Self

Available on crate feature std only.

See the inherent exp_m1 method.

Source§

fn floor(self) -> Self

Available on crate feature std only.

See the inherent floor method.

Source§

fn fract(self) -> Self

Available on crate feature std only.

See the inherent fract method.

Source§

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

Available on crate feature std only.

See the inherent hypot method.

Source§

fn ln(self) -> Self

Available on crate feature std only.

See the inherent ln method.

Source§

fn ln_1p(self) -> Self

Available on crate feature std only.

See the inherent ln_1p method.

Source§

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

Available on crate feature std only.

See the inherent log method.

Source§

fn log2(self) -> Self

Available on crate feature std only.

See the inherent log2 method.

Source§

fn log10(self) -> Self

Available on crate feature std only.

See the inherent log10 method.

Source§

fn mul_add(self, a: Self, b: Self) -> Self

Available on crate feature std only.

See the inherent mul_add method.

Source§

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

Available on crate feature std only.

See the inherent powf method.

Source§

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

Available on crate feature std only.

See the inherent powi method.

Source§

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

Available on crate feature std only.

See the inherent rem_euclid method.

Source§

fn round(self) -> Self

Available on crate feature std only.

See the inherent round method.

Source§

fn round_ties_even(self) -> Self

Available on crate feature std only.

See the inherent round_ties_even method.

Source§

fn sin(self) -> Self

Available on crate feature std only.

See the inherent sin method.

Source§

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

Available on crate feature std only.

See the inherent sin_cos method.

Source§

fn sinh(self) -> Self

Available on crate feature std only.

See the inherent sinh method.

Source§

fn sqrt(self) -> Self

Available on crate feature std only.

See the inherent sqrt method.

Source§

fn tan(self) -> Self

Available on crate feature std only.

See the inherent tan method.

Source§

fn tanh(self) -> Self

Available on crate feature std only.

See the inherent tanh method.

Source§

fn trunc(self) -> Self

Available on crate feature std only.

See the inherent trunc method.

Source§

const DIGITS: u32 = Self::DIGITS

Source§

const EPSILON: Self = Self::EPSILON

Source§

const INFINITY: Self = Self::INFINITY

Source§

const MANTISSA_DIGITS: u32 = Self::MANTISSA_DIGITS

Source§

const MAX: Self = Self::MAX

Source§

const MAX_10_EXP: i32 = Self::MAX_10_EXP

Source§

const MAX_EXP: i32 = Self::MAX_EXP

Source§

const MIN: Self = Self::MIN

Source§

const MIN_10_EXP: i32 = Self::MIN_10_EXP

Source§

const MIN_EXP: i32 = Self::MIN_EXP

Source§

const MIN_POSITIVE: Self = Self::MIN_POSITIVE

Source§

const NAN: Self = Self::NAN

Source§

const NEG_INFINITY: Self = Self::NEG_INFINITY

Source§

const RADIX: u32 = Self::RADIX

Source§

const E: Self = f32_consts::E

Source§

const FRAC_1_PI: Self = f32_consts::FRAC_1_PI

Source§

const FRAC_1_SQRT_2: Self = f32_consts::FRAC_1_SQRT_2

Source§

const FRAC_2_PI: Self = f32_consts::FRAC_2_PI

Source§

const FRAC_2_SQRT_PI: Self = f32_consts::FRAC_2_SQRT_PI

Source§

const FRAC_PI_2: Self = f32_consts::FRAC_PI_2

Source§

const FRAC_PI_3: Self = f32_consts::FRAC_PI_3

Source§

const FRAC_PI_4: Self = f32_consts::FRAC_PI_4

Source§

const FRAC_PI_6: Self = f32_consts::FRAC_PI_6

Source§

const FRAC_PI_8: Self = f32_consts::FRAC_PI_8

Source§

const LN_2: Self = f32_consts::LN_2

Source§

const LN_10: Self = f32_consts::LN_10

Source§

const LOG2_10: Self = f32_consts::LOG2_10

Source§

const LOG2_E: Self = f32_consts::LOG2_E

Source§

const LOG10_2: Self = f32_consts::LOG10_2

Source§

const LOG10_E: Self = f32_consts::LOG10_E

Source§

const PI: Self = f32_consts::PI

Source§

const SQRT_2: Self = f32_consts::SQRT_2

Source§

const TAU: Self = f32_consts::TAU

Source§

type Bits = u32

Source§

impl PrimitiveFloat for f64

Source§

fn from_bits(value: Self::Bits) -> Self

See the inherent from_bits method.

Source§

fn abs(self) -> Self

See the inherent abs method.

Source§

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

See the inherent clamp method.

Source§

fn classify(self) -> FpCategory

See the inherent classify method.

Source§

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

See the inherent copysign method.

Source§

fn is_finite(self) -> bool

See the inherent is_finite method.

Source§

fn is_infinite(self) -> bool

See the inherent is_infinite method.

Source§

fn is_nan(self) -> bool

See the inherent is_nan method.

Source§

fn is_normal(self) -> bool

See the inherent is_normal method.

Source§

fn is_sign_negative(self) -> bool

See the inherent is_sign_negative method.

Source§

fn is_sign_positive(self) -> bool

See the inherent is_sign_positive method.

Source§

fn is_subnormal(self) -> bool

See the inherent is_subnormal method.

Source§

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

See the inherent max method.

Source§

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

See the inherent min method.

Source§

fn next_down(self) -> Self

See the inherent next_down method.

Source§

fn next_up(self) -> Self

See the inherent next_up method.

Source§

fn recip(self) -> Self

See the inherent recip method.

Source§

fn signum(self) -> Self

See the inherent signum method.

Source§

fn to_bits(self) -> Self::Bits

See the inherent to_bits method.

Source§

fn to_degrees(self) -> Self

See the inherent to_degrees method.

Source§

fn to_radians(self) -> Self

See the inherent to_radians method.

Source§

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

See the inherent total_cmp method.

Source§

unsafe fn to_int_unchecked<Int>(self) -> Int
where Self: PrimitiveFloatToInt<Int>,

See the inherent to_int_unchecked method.

Source§

fn acos(self) -> Self

Available on crate feature std only.

See the inherent acos method.

Source§

fn acosh(self) -> Self

Available on crate feature std only.

See the inherent acosh method.

Source§

fn asin(self) -> Self

Available on crate feature std only.

See the inherent asin method.

Source§

fn asinh(self) -> Self

Available on crate feature std only.

See the inherent asinh method.

Source§

fn atan(self) -> Self

Available on crate feature std only.

See the inherent atan method.

Source§

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

Available on crate feature std only.

See the inherent atan2 method.

Source§

fn atanh(self) -> Self

Available on crate feature std only.

See the inherent atanh method.

Source§

fn cbrt(self) -> Self

Available on crate feature std only.

See the inherent cbrt method.

Source§

fn ceil(self) -> Self

Available on crate feature std only.

See the inherent ceil method.

Source§

fn cos(self) -> Self

Available on crate feature std only.

See the inherent cos method.

Source§

fn cosh(self) -> Self

Available on crate feature std only.

See the inherent cosh method.

Source§

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

Available on crate feature std only.

See the inherent div_euclid method.

Source§

fn exp(self) -> Self

Available on crate feature std only.

See the inherent exp method.

Source§

fn exp2(self) -> Self

Available on crate feature std only.

See the inherent exp2 method.

Source§

fn exp_m1(self) -> Self

Available on crate feature std only.

See the inherent exp_m1 method.

Source§

fn floor(self) -> Self

Available on crate feature std only.

See the inherent floor method.

Source§

fn fract(self) -> Self

Available on crate feature std only.

See the inherent fract method.

Source§

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

Available on crate feature std only.

See the inherent hypot method.

Source§

fn ln(self) -> Self

Available on crate feature std only.

See the inherent ln method.

Source§

fn ln_1p(self) -> Self

Available on crate feature std only.

See the inherent ln_1p method.

Source§

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

Available on crate feature std only.

See the inherent log method.

Source§

fn log2(self) -> Self

Available on crate feature std only.

See the inherent log2 method.

Source§

fn log10(self) -> Self

Available on crate feature std only.

See the inherent log10 method.

Source§

fn mul_add(self, a: Self, b: Self) -> Self

Available on crate feature std only.

See the inherent mul_add method.

Source§

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

Available on crate feature std only.

See the inherent powf method.

Source§

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

Available on crate feature std only.

See the inherent powi method.

Source§

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

Available on crate feature std only.

See the inherent rem_euclid method.

Source§

fn round(self) -> Self

Available on crate feature std only.

See the inherent round method.

Source§

fn round_ties_even(self) -> Self

Available on crate feature std only.

See the inherent round_ties_even method.

Source§

fn sin(self) -> Self

Available on crate feature std only.

See the inherent sin method.

Source§

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

Available on crate feature std only.

See the inherent sin_cos method.

Source§

fn sinh(self) -> Self

Available on crate feature std only.

See the inherent sinh method.

Source§

fn sqrt(self) -> Self

Available on crate feature std only.

See the inherent sqrt method.

Source§

fn tan(self) -> Self

Available on crate feature std only.

See the inherent tan method.

Source§

fn tanh(self) -> Self

Available on crate feature std only.

See the inherent tanh method.

Source§

fn trunc(self) -> Self

Available on crate feature std only.

See the inherent trunc method.

Source§

const DIGITS: u32 = Self::DIGITS

Source§

const EPSILON: Self = Self::EPSILON

Source§

const INFINITY: Self = Self::INFINITY

Source§

const MANTISSA_DIGITS: u32 = Self::MANTISSA_DIGITS

Source§

const MAX: Self = Self::MAX

Source§

const MAX_10_EXP: i32 = Self::MAX_10_EXP

Source§

const MAX_EXP: i32 = Self::MAX_EXP

Source§

const MIN: Self = Self::MIN

Source§

const MIN_10_EXP: i32 = Self::MIN_10_EXP

Source§

const MIN_EXP: i32 = Self::MIN_EXP

Source§

const MIN_POSITIVE: Self = Self::MIN_POSITIVE

Source§

const NAN: Self = Self::NAN

Source§

const NEG_INFINITY: Self = Self::NEG_INFINITY

Source§

const RADIX: u32 = Self::RADIX

Source§

const E: Self = f64_consts::E

Source§

const FRAC_1_PI: Self = f64_consts::FRAC_1_PI

Source§

const FRAC_1_SQRT_2: Self = f64_consts::FRAC_1_SQRT_2

Source§

const FRAC_2_PI: Self = f64_consts::FRAC_2_PI

Source§

const FRAC_2_SQRT_PI: Self = f64_consts::FRAC_2_SQRT_PI

Source§

const FRAC_PI_2: Self = f64_consts::FRAC_PI_2

Source§

const FRAC_PI_3: Self = f64_consts::FRAC_PI_3

Source§

const FRAC_PI_4: Self = f64_consts::FRAC_PI_4

Source§

const FRAC_PI_6: Self = f64_consts::FRAC_PI_6

Source§

const FRAC_PI_8: Self = f64_consts::FRAC_PI_8

Source§

const LN_2: Self = f64_consts::LN_2

Source§

const LN_10: Self = f64_consts::LN_10

Source§

const LOG2_10: Self = f64_consts::LOG2_10

Source§

const LOG2_E: Self = f64_consts::LOG2_E

Source§

const LOG10_2: Self = f64_consts::LOG10_2

Source§

const LOG10_E: Self = f64_consts::LOG10_E

Source§

const PI: Self = f64_consts::PI

Source§

const SQRT_2: Self = f64_consts::SQRT_2

Source§

const TAU: Self = f64_consts::TAU

Source§

type Bits = u64

Implementors§