Trait lav::Real

source ·
pub trait Real
where for<'a, 'a, 'a, 'a, 'a, 'a> Self: Send + Sync + Clone + Copy + Default + ApproxEq<Self, Self> + PartialEq + PartialOrd + From<u8> + From<i8> + From<u16> + From<i16> + FromStr<Err = ParseFloatError> + Product<Self> + Sum<Self> + Product<&'a Self> + Sum<&'a Self> + FloatToInt<usize> + FloatToInt<isize> + FloatToInt<u128> + FloatToInt<i128> + FloatToInt<u64> + FloatToInt<i64> + FloatToInt<u32> + FloatToInt<i32> + FloatToInt<u16> + FloatToInt<i16> + FloatToInt<u8> + FloatToInt<i8> + Debug + Add<Output = Self> + AddAssign + Sub<Output = Self> + SubAssign + Mul<Output = Self> + MulAssign + Div<Output = Self> + DivAssign + Rem<Output = Self> + RemAssign + Add<&'a Self, Output = Self> + AddAssign<&'a Self> + Sub<&'a Self, Output = Self> + SubAssign<&'a Self> + Mul<&'a Self, Output = Self> + MulAssign<&'a Self> + Div<&'a Self, Output = Self> + DivAssign<&'a Self> + Rem<&'a Self, Output = Self> + RemAssign<&'a Self> + Neg<Output = Self> + SimdElement,
{ type Bits: Bits; type Simd<const N: usize>: SimdReal<Self, N> where LaneCount<N>: SupportedLaneCount;
Show 38 associated constants and 56 methods const NATIVE_LANE_COUNT: usize; const ZERO: Self; const ONE: Self; const TWO: Self; const PI: Self; const TAU: Self; const SQRT_2: Self; const FRAC_1_2: Self; const FRAC_1_3: Self; const FRAC_1_4: Self; const FRAC_1_6: Self; const FRAC_1_8: 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 FRAC_1_PI: Self; const FRAC_1_TAU: Self; const FRAC_1_SQRT_2: Self; const FRAC_2_PI: Self; const FRAC_2_SQRT_PI: Self; const EPSILON: Self; const SQRT_EPSILON: Self; const CBRT_EPSILON: Self; const RADIX: u32; const MANTISSA_DIGITS: u32; const DIGITS: u32; const MIN: Self; const MIN_POSITIVE: Self; const MAX: Self; const MIN_EXP: i32; const MAX_EXP: i32; const MIN_10_EXP: i32; const MAX_10_EXP: i32; const NAN: Self; const INFINITY: Self; const NEG_INFINITY: Self; // Required methods fn from_bits(bits: Self::Bits) -> Self; fn to_bits(self) -> Self::Bits; fn is_sign_positive(self) -> bool; fn is_sign_negative(self) -> bool; fn is_nan(self) -> bool; fn is_infinite(self) -> bool; fn is_finite(self) -> bool; fn is_subnormal(self) -> bool; fn is_normal(self) -> bool; fn classify(self) -> FpCategory; fn floor(self) -> Self; fn ceil(self) -> Self; fn round(self) -> Self; fn trunc(self) -> Self; fn fract(self) -> Self; fn abs(self) -> Self; fn signum(self) -> Self; fn copysign(self, sign: Self) -> Self; fn min(self, other: Self) -> Self; fn max(self, other: Self) -> Self; fn clamp(self, min: Self, max: Self) -> Self; fn recip(self) -> Self; fn to_radians(self) -> Self; fn to_degrees(self) -> Self; fn mul_add(self, a: Self, b: Self) -> Self; fn div_euclid(self, rhs: Self) -> Self; fn rem_euclid(self, rhs: Self) -> Self; fn powf(self, n: Self) -> Self; fn exp(self) -> Self; fn exp_m1(self) -> Self; fn exp2(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 sqrt(self) -> Self; fn cbrt(self) -> Self; fn hypot(self, other: Self) -> Self; fn sin(self) -> Self; fn sinh(self) -> Self; fn cos(self) -> Self; fn cosh(self) -> Self; fn sin_cos(self) -> (Self, Self); fn tan(self) -> Self; fn asin(self) -> Self; fn asinh(self) -> Self; fn acos(self) -> Self; fn acosh(self) -> Self; fn atan(self) -> Self; fn atanh(self) -> Self; fn atan2(self, other: Self) -> Self; fn total_cmp(&self, other: &Self) -> Ordering; // Provided methods fn splat<const N: usize>(self) -> Self::Simd<N> where LaneCount<N>: SupportedLaneCount { ... } fn as_simd<const N: usize>( slice: &[Self] ) -> (&[Self], &[Self::Simd<N>], &[Self]) where LaneCount<N>: SupportedLaneCount { ... } fn as_simd_mut<const N: usize>( slice: &mut [Self] ) -> (&mut [Self], &mut [Self::Simd<N>], &mut [Self]) where LaneCount<N>: SupportedLaneCount { ... }
}
Expand description

Real number of f32 or f64 with associated Bits representation and SimdReal vector.

Required Associated Types§

source

type Bits: Bits

Associated bits representation.

source

type Simd<const N: usize>: SimdReal<Self, N> where LaneCount<N>: SupportedLaneCount

Associated vector.

Required Associated Constants§

source

const NATIVE_LANE_COUNT: usize

Available on crate feature target-features only.

Native lane count of current build target or 1 if unknown.

source

const ZERO: Self

$0$

source

const ONE: Self

$1$

source

const TWO: Self

$2$

source

const PI: Self

$\pi$

source

const TAU: Self

$\tau$

source

const SQRT_2: Self

$\sqrt{2}$

source

const FRAC_1_2: Self

$\frac{1}{2}$

source

const FRAC_1_3: Self

$\frac{1}{3}$

source

const FRAC_1_4: Self

$\frac{1}{4}$

source

const FRAC_1_6: Self

$\frac{1}{6}$

source

const FRAC_1_8: Self

$\frac{1}{8}$

source

const FRAC_PI_2: Self

$\frac{\pi}{2}$

source

const FRAC_PI_3: Self

$\frac{\pi}{3}$

source

const FRAC_PI_4: Self

$\frac{\pi}{4}$

source

const FRAC_PI_6: Self

$\frac{\pi}{6}$

source

const FRAC_PI_8: Self

$\frac{\pi}{8}$

source

const FRAC_1_PI: Self

$\frac{1}{\pi}$

source

const FRAC_1_TAU: Self

$\frac{1}{\tau}$

source

const FRAC_1_SQRT_2: Self

$\frac{1}{\sqrt{2}}$

source

const FRAC_2_PI: Self

$\frac{2}{\pi}$

source

const FRAC_2_SQRT_PI: Self

$\frac{2}{\sqrt{\pi}}$

source

const EPSILON: Self

Machine epsilon $\epsilon$ of floating-point type.

source

const SQRT_EPSILON: Self

$\sqrt{\epsilon}$

source

const CBRT_EPSILON: Self

$\sqrt[3]{\epsilon}$

source

const RADIX: u32

The radix or base of the internal representation of floating-point type.

source

const MANTISSA_DIGITS: u32

Number of significant digits in base $2$.

source

const DIGITS: u32

Approximate number of significant digits in base $10$.

source

const MIN: Self

Smallest finite floating-point type value.

source

const MIN_POSITIVE: Self

Smallest positive normal floating-point type value.

source

const MAX: Self

Largest finite floating-point type value.

source

const MIN_EXP: i32

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

source

const MAX_EXP: i32

Maximum possible power of $2$ exponent.

source

const MIN_10_EXP: i32

Minimum possible normal power of $10$ exponent.

source

const MAX_10_EXP: i32

Maximum possible power of $10$ exponent.

source

const NAN: Self

Not a number (NaN).

source

const INFINITY: Self

Infinity $\infty$.

source

const NEG_INFINITY: Self

Negative infinity $-\infty$.

Required Methods§

source

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

Raw transmutation from u64.

This is currently identical to transmute::<u64, f64>(v) on all platforms. It turns out this is incredibly portable, for two reasons:

  • Floats and Ints have the same endianness on all supported platforms.
  • IEEE-754 very precisely specifies the bit layout of floats.

However there is one caveat: prior to the 2008 version of IEEE-754, how to interpret the NaN signaling bit wasn’t actually specified. Most platforms (notably x86 and ARM) picked the interpretation that was ultimately standardized in 2008, but some didn’t (notably MIPS). As a result, all signaling NaNs on MIPS are quiet NaNs on x86, and vice-versa.

Rather than trying to preserve signaling-ness cross-platform, this implementation favors preserving the exact bits. This means that any payloads encoded in NaNs will be preserved even if the result of this method is sent over the network from an x86 machine to a MIPS one.

If the results of this method are only manipulated by the same architecture that produced them, then there is no portability concern.

If the input isn’t NaN, then there is no portability concern.

If you don’t care about signaling-ness (very likely), then there is no portability concern.

Note that this function is distinct from as casting, which attempts to preserve the numeric value, and not the bitwise value.

source

fn to_bits(self) -> Self::Bits

Raw transmutation to u64.

This is currently identical to transmute::<f64, u64>(self) on all platforms.

See from_bits for some discussion of the portability of this operation (there are almost no issues).

Note that this function is distinct from as casting, which attempts to preserve the numeric value, and not the bitwise value.

source

fn is_sign_positive(self) -> bool

Returns true for each lane if it has a positive sign, including +0.0, NaNs with positive sign bit and positive infinity.

source

fn is_sign_negative(self) -> bool

Returns true for each lane if it has a negative sign, including -0.0, NaNs with negative sign bit and negative infinity.

source

fn is_nan(self) -> bool

Returns true for each lane if its value is NaN.

source

fn is_infinite(self) -> bool

Returns true for each lane if its value is positive infinity or negative infinity.

source

fn is_finite(self) -> bool

Returns true for each lane if its value is neither infinite nor NaN.

source

fn is_subnormal(self) -> bool

Returns true for each lane if its value is subnormal.

source

fn is_normal(self) -> bool

Returns true for each lane if its value is neither neither zero, infinite, subnormal, or 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 floor(self) -> Self

Returns the largest integer less than or equal to a number.

source

fn ceil(self) -> Self

Returns the smallest integer greater than or equal to a number.

source

fn round(self) -> Self

Returns the nearest integer to a number. Round half-way cases away from 0.0.

source

fn trunc(self) -> Self

Returns the integer part of a number.

source

fn fract(self) -> Self

Returns the fractional part of a number.

source

fn abs(self) -> Self

Computes the absolute value of self.

Returns Self::NAN if the number is NaN.

source

fn signum(self) -> Self

Returns a number that represents the sign of self.

source

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

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

Equal to self if the sign of self and sign are the same, otherwise equal to -self.

If self is NaN, then NaN with the sign of sign is returned.

source

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

Returns the minimum of each lane.

If one of the values is NaN, then the other value is returned.

source

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

Returns the maximum of each lane.

If one of the values is NaN, then the other value is returned.

source

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

Restrict each lane to a certain interval unless it is NaN.

For each lane in self, returns the corresponding lane in max if the lane is greater than max, and the corresponding lane in min if the lane is less than min. Otherwise, returns the lane in self.

source

fn recip(self) -> Self

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

source

fn to_radians(self) -> Self

Converts degrees to radians.

source

fn to_degrees(self) -> Self

Converts radians to degrees.

source

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

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

Using mul_add may be more performant than an unfused multiply-add if the target architecture has a dedicated fma CPU instruction. However, this is not always true, and will be heavily dependant on designing algorithms with specific target hardware in mind.

source

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

Calculates Euclidean division, the matching method for Self::rem_euclid().

This computes the integer n such that self = n * rhs + self.rem_euclid(rhs). In other words, the result is self / rhs rounded to the integer n such that self >= n * rhs.

source

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

Calculates the least non-negative remainder of self (mod rhs).

In particular, the return value r satisfies 0.0 <= r < rhs.abs() in most cases. However, due to a floating point round-off error it can result in r == rhs.abs(), violating the mathematical definition, if self is much smaller than rhs.abs() in magnitude and self < 0.0. This result is not an element of the function’s codomain, but it is the closest floating point number in the real numbers and thus fulfills the property self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs) approximatively.

source

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

Raises a number to a floating-point power.

source

fn exp(self) -> Self

Returns $e^x$.

source

fn exp_m1(self) -> Self

Returns $e^x - 1$ in a way that is accurate even if the number is close to zero.

source

fn exp2(self) -> Self

Returns $2^x$.

source

fn ln(self) -> Self

Returns the natural logarithm of the number.

source

fn ln_1p(self) -> Self

Returns the natural logarithm of the number plus one more accurately than if the operations were performed separately.

source

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

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

The result might not be correctly rounded owing to implementation details:

  • Self::log2() can produce more accurate results for base $2$, and
  • Self::log10() can produce more accurate results for base $10$.
source

fn log2(self) -> Self

Returns the base $2$ logarithm of the number.

source

fn log10(self) -> Self

Returns the base $10$ logarithm of the number.

source

fn sqrt(self) -> Self

Returns the square root of a number.

Returns NaN if self is a negative number.

source

fn cbrt(self) -> Self

Returns the cube root of a number.

source

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

Calculates the length of the hypotenuse of a right-angle triangle given legs of length self and other.

source

fn sin(self) -> Self

Computes the sine of a number in radians.

source

fn sinh(self) -> Self

Computes the hyperbolic sine of a number in radians.

source

fn cos(self) -> Self

Computes the cosine of a number in radians.

source

fn cosh(self) -> Self

Computes the hyperbolic cosine of a number in radians.

source

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

Simultaneously computes the sine and cosine of self.

Returns (self.sin(), self.cos()).

source

fn tan(self) -> Self

Computes the tangent of a number in radians.

source

fn asin(self) -> Self

Computes the arcsine of a number.

Return value is in radians in the range $[-{\pi \over 2}, {\pi \over 2}]$ or NaN if the number is outside the range $[-1, 1]$.

source

fn asinh(self) -> Self

Inverse hyperbolic sine function.

source

fn acos(self) -> Self

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

Inverse hyperbolic cosine function.

source

fn atan(self) -> Self

Computes the arctangent of a number.

Return value is in radians in the range $[-{\pi \over 2}, {\pi \over 2}]$.

source

fn atanh(self) -> Self

Inverse hyperbolic tangent function.

source

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

Computes the four quadrant arctangent of self as $y$ and other as $x$ in radians.

$$ \arctan(y, x) = \begin{cases} 0 & \text{if } x = 0 \wedge y = 0 \\ \arctan({y \over x}) \in [-{\pi \over 2}, {\pi \over 2}] & \text{if } x \ge 0 \\ \arctan({y \over x}) + \pi \in ({\pi \over 2}, \pi] & \text{if } y \ge 0 \\ \arctan({y \over x}) - \pi \in (-{\pi \over 2}, -{\pi \over 2}) & \text{if } y \lt 0 \end{cases} $$

source

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

Returns an ordering between self and other values.

Unlike the standard partial comparison between floating point numbers, this comparison always produces an ordering in accordance to the totalOrder predicate as defined in IEEE 754 (2008 revision) floating point standard. The values are ordered in following order:

  • Negative quiet NaN
  • Negative signaling NaN
  • Negative infinity
  • Negative numbers
  • Negative subnormal numbers
  • Negative zero
  • Positive zero
  • Positive subnormal numbers
  • Positive numbers
  • Positive infinity
  • Positive signaling NaN
  • Positive quiet NaN

Note that this function does not always agree with the PartialOrd and PartialEq implementations of floating-point type. In particular, they regard negative and positive zero as equal, while Self::total_cmp() does not.

Provided Methods§

source

fn splat<const N: usize>(self) -> Self::Simd<N>

Constructs a SIMD vector by setting all lanes to the given value.

source

fn as_simd<const N: usize>( slice: &[Self] ) -> (&[Self], &[Self::Simd<N>], &[Self])

Split a slice into a prefix, a middle of aligned SIMD vectors, and a suffix.

You’re only assured thatcself.len() == prefix.len() + middle.len() * N + suffix.len().

Notably, all of the following are possible:

  • prefix.len() >= N,
  • middle.is_empty() despite self.len() >= 3 * N,
  • suffix.len() >= N.

That said, this is a safe method, so if you’re only writing safe code, then this can at most cause incorrect logic, not unsoundness.

§Panics

Panic if the size of the SIMD vector is different from N times that of the scalar.

source

fn as_simd_mut<const N: usize>( slice: &mut [Self] ) -> (&mut [Self], &mut [Self::Simd<N>], &mut [Self])

Split a mutable slice into a mutable prefix, a middle of aligned SIMD vectors, and a mutable suffix.

You’re only assured that self.len() == prefix.len() + middle.len() * N + suffix.len().

Notably, all of the following are possible:

  • prefix.len() >= N,
  • middle.is_empty() despite self.len() >= 3 * N,
  • suffix.len() >= N.

That said, this is a safe method, so if you’re only writing safe code, then this can at most cause incorrect logic, not unsoundness.

This is the mutable version of Self::as_simd.

§Panics

Panic if the size of the SIMD vector is different from N times that of the scalar.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Real for f32

§

type Bits = u32

§

type Simd<const N: usize> = Simd<f32, N> where LaneCount<N>: SupportedLaneCount

source§

const NATIVE_LANE_COUNT: usize = 4usize

Available on crate feature target-features only.
source§

const ZERO: Self = 0f32

source§

const ONE: Self = 1f32

source§

const TWO: Self = 2f32

source§

const PI: Self = 3.14159274f32

source§

const TAU: Self = 6.28318548f32

source§

const SQRT_2: Self = 1.41421354f32

source§

const FRAC_1_2: Self = 0.5f32

source§

const FRAC_1_3: Self = 0.333333343f32

source§

const FRAC_1_4: Self = 0.25f32

source§

const FRAC_1_6: Self = 0.166666672f32

source§

const FRAC_1_8: Self = 0.125f32

source§

const FRAC_PI_2: Self = 1.57079637f32

source§

const FRAC_PI_3: Self = 1.04719758f32

source§

const FRAC_PI_4: Self = 0.785398185f32

source§

const FRAC_PI_6: Self = 0.52359879f32

source§

const FRAC_PI_8: Self = 0.392699093f32

source§

const FRAC_1_PI: Self = 0.318309873f32

source§

const FRAC_1_TAU: Self = 0.159154937f32

source§

const FRAC_1_SQRT_2: Self = 0.707106769f32

source§

const FRAC_2_PI: Self = 0.636619746f32

source§

const FRAC_2_SQRT_PI: Self = 1.12837923f32

source§

const EPSILON: Self = 1.1920929E-7f32

source§

const SQRT_EPSILON: Self = 3.45266977E-4f32

source§

const CBRT_EPSILON: Self = 0.00492156669f32

source§

const RADIX: u32 = 2u32

source§

const MANTISSA_DIGITS: u32 = 24u32

source§

const DIGITS: u32 = 6u32

source§

const MIN: Self = -3.40282347E+38f32

source§

const MIN_POSITIVE: Self = 1.17549435E-38f32

source§

const MAX: Self = 3.40282347E+38f32

source§

const MIN_EXP: i32 = -125i32

source§

const MAX_EXP: i32 = 128i32

source§

const MIN_10_EXP: i32 = -37i32

source§

const MAX_10_EXP: i32 = 38i32

source§

const NAN: Self = NaN_f32

source§

const INFINITY: Self = +Inf_f32

source§

const NEG_INFINITY: Self = -Inf_f32

source§

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

source§

fn to_bits(self) -> Self::Bits

source§

fn is_sign_positive(self) -> bool

source§

fn is_sign_negative(self) -> bool

source§

fn is_nan(self) -> bool

source§

fn is_infinite(self) -> bool

source§

fn is_finite(self) -> bool

source§

fn is_subnormal(self) -> bool

source§

fn is_normal(self) -> bool

source§

fn classify(self) -> FpCategory

source§

fn floor(self) -> Self

source§

fn ceil(self) -> Self

source§

fn round(self) -> Self

source§

fn trunc(self) -> Self

source§

fn fract(self) -> Self

source§

fn abs(self) -> Self

source§

fn signum(self) -> Self

source§

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

source§

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

source§

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

source§

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

source§

fn recip(self) -> Self

source§

fn to_radians(self) -> Self

source§

fn to_degrees(self) -> Self

source§

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

source§

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

source§

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

source§

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

source§

fn exp(self) -> Self

source§

fn exp_m1(self) -> Self

source§

fn exp2(self) -> Self

source§

fn ln(self) -> Self

source§

fn ln_1p(self) -> Self

source§

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

source§

fn log2(self) -> Self

source§

fn log10(self) -> Self

source§

fn sqrt(self) -> Self

source§

fn cbrt(self) -> Self

source§

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

source§

fn sin(self) -> Self

source§

fn sinh(self) -> Self

source§

fn cos(self) -> Self

source§

fn cosh(self) -> Self

source§

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

source§

fn tan(self) -> Self

source§

fn asin(self) -> Self

source§

fn asinh(self) -> Self

source§

fn acos(self) -> Self

source§

fn acosh(self) -> Self

source§

fn atan(self) -> Self

source§

fn atanh(self) -> Self

source§

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

source§

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

source§

impl Real for f64

§

type Bits = u64

§

type Simd<const N: usize> = Simd<f64, N> where LaneCount<N>: SupportedLaneCount

source§

const NATIVE_LANE_COUNT: usize = 2usize

Available on crate feature target-features only.
source§

const ZERO: Self = 0f64

source§

const ONE: Self = 1f64

source§

const TWO: Self = 2f64

source§

const PI: Self = 3.1415926535897931f64

source§

const TAU: Self = 6.2831853071795862f64

source§

const SQRT_2: Self = 1.4142135623730951f64

source§

const FRAC_1_2: Self = 0.5f64

source§

const FRAC_1_3: Self = 0.33333333333333331f64

source§

const FRAC_1_4: Self = 0.25f64

source§

const FRAC_1_6: Self = 0.16666666666666666f64

source§

const FRAC_1_8: Self = 0.125f64

source§

const FRAC_PI_2: Self = 1.5707963267948966f64

source§

const FRAC_PI_3: Self = 1.0471975511965979f64

source§

const FRAC_PI_4: Self = 0.78539816339744828f64

source§

const FRAC_PI_6: Self = 0.52359877559829893f64

source§

const FRAC_PI_8: Self = 0.39269908169872414f64

source§

const FRAC_1_PI: Self = 0.31830988618379069f64

source§

const FRAC_1_TAU: Self = 0.15915494309189535f64

source§

const FRAC_1_SQRT_2: Self = 0.70710678118654757f64

source§

const FRAC_2_PI: Self = 0.63661977236758138f64

source§

const FRAC_2_SQRT_PI: Self = 1.1283791670955126f64

source§

const EPSILON: Self = 2.2204460492503131E-16f64

source§

const SQRT_EPSILON: Self = 1.4901161193847656E-8f64

source§

const CBRT_EPSILON: Self = 6.0554544523933395E-6f64

source§

const RADIX: u32 = 2u32

source§

const MANTISSA_DIGITS: u32 = 53u32

source§

const DIGITS: u32 = 15u32

source§

const MIN: Self = -1.7976931348623157E+308f64

source§

const MIN_POSITIVE: Self = 2.2250738585072014E-308f64

source§

const MAX: Self = 1.7976931348623157E+308f64

source§

const MIN_EXP: i32 = -1_021i32

source§

const MAX_EXP: i32 = 1_024i32

source§

const MIN_10_EXP: i32 = -307i32

source§

const MAX_10_EXP: i32 = 308i32

source§

const NAN: Self = NaN_f64

source§

const INFINITY: Self = +Inf_f64

source§

const NEG_INFINITY: Self = -Inf_f64

source§

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

source§

fn to_bits(self) -> Self::Bits

source§

fn is_sign_positive(self) -> bool

source§

fn is_sign_negative(self) -> bool

source§

fn is_nan(self) -> bool

source§

fn is_infinite(self) -> bool

source§

fn is_finite(self) -> bool

source§

fn is_subnormal(self) -> bool

source§

fn is_normal(self) -> bool

source§

fn classify(self) -> FpCategory

source§

fn floor(self) -> Self

source§

fn ceil(self) -> Self

source§

fn round(self) -> Self

source§

fn trunc(self) -> Self

source§

fn fract(self) -> Self

source§

fn abs(self) -> Self

source§

fn signum(self) -> Self

source§

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

source§

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

source§

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

source§

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

source§

fn recip(self) -> Self

source§

fn to_radians(self) -> Self

source§

fn to_degrees(self) -> Self

source§

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

source§

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

source§

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

source§

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

source§

fn exp(self) -> Self

source§

fn exp_m1(self) -> Self

source§

fn exp2(self) -> Self

source§

fn ln(self) -> Self

source§

fn ln_1p(self) -> Self

source§

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

source§

fn log2(self) -> Self

source§

fn log10(self) -> Self

source§

fn sqrt(self) -> Self

source§

fn cbrt(self) -> Self

source§

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

source§

fn sin(self) -> Self

source§

fn sinh(self) -> Self

source§

fn cos(self) -> Self

source§

fn cosh(self) -> Self

source§

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

source§

fn tan(self) -> Self

source§

fn asin(self) -> Self

source§

fn asinh(self) -> Self

source§

fn acos(self) -> Self

source§

fn acosh(self) -> Self

source§

fn atan(self) -> Self

source§

fn atanh(self) -> Self

source§

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

source§

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

Implementors§