pub struct f64x8 { /* private fields */ }Expand description
A SIMD vector with eight elements of type f64.
See the crate level documentation for more information about SIMD vectors.
Implementations§
Source§impl f64x8
The following functionality exists for all SIMD vectors.
impl f64x8
The following functionality exists for all SIMD vectors.
Sourcepub const fn splat(elem: f64) -> Self
pub const fn splat(elem: f64) -> Self
Constructs a new SIMD vector with all elements set to the given value.
Sourcepub const fn as_array(&self) -> &[f64; 8]
pub const fn as_array(&self) -> &[f64; 8]
Returns an array reference containing the entire SIMD vector.
Sourcepub const fn as_mut_array(&mut self) -> &mut [f64; 8]
pub const fn as_mut_array(&mut self) -> &mut [f64; 8]
Returns a mutable array reference containing the entire SIMD vector.
Sourcepub fn simd_eq<Rhs>(self, other: Rhs) -> <Self as CmpEq<Rhs>>::Outputwhere
Self: CmpEq<Rhs>,
pub fn simd_eq<Rhs>(self, other: Rhs) -> <Self as CmpEq<Rhs>>::Outputwhere
Self: CmpEq<Rhs>,
Returns a mask that checks if each element of self is equal to the
corresponding element of other.
Sourcepub fn simd_ne<Rhs>(self, other: Rhs) -> <Self as CmpNe<Rhs>>::Outputwhere
Self: CmpNe<Rhs>,
pub fn simd_ne<Rhs>(self, other: Rhs) -> <Self as CmpNe<Rhs>>::Outputwhere
Self: CmpNe<Rhs>,
Returns a mask that checks if each element of self is not equal to
the corresponding element of other.
Sourcepub fn simd_lt<Rhs>(self, other: Rhs) -> <Self as CmpLt<Rhs>>::Outputwhere
Self: CmpLt<Rhs>,
pub fn simd_lt<Rhs>(self, other: Rhs) -> <Self as CmpLt<Rhs>>::Outputwhere
Self: CmpLt<Rhs>,
Returns a mask that checks if each element of self is less than
the corresponding element of other.
Sourcepub fn simd_gt<Rhs>(self, other: Rhs) -> <Self as CmpGt<Rhs>>::Outputwhere
Self: CmpGt<Rhs>,
pub fn simd_gt<Rhs>(self, other: Rhs) -> <Self as CmpGt<Rhs>>::Outputwhere
Self: CmpGt<Rhs>,
Returns a mask that checks if each element of self is greater than
the corresponding element of other.
Sourcepub fn simd_le<Rhs>(self, other: Rhs) -> <Self as CmpLe<Rhs>>::Outputwhere
Self: CmpLe<Rhs>,
pub fn simd_le<Rhs>(self, other: Rhs) -> <Self as CmpLe<Rhs>>::Outputwhere
Self: CmpLe<Rhs>,
Returns a mask that checks if each element of self is less than or
equal to the corresponding element of other.
Sourcepub fn simd_ge<Rhs>(self, other: Rhs) -> <Self as CmpGe<Rhs>>::Outputwhere
Self: CmpGe<Rhs>,
pub fn simd_ge<Rhs>(self, other: Rhs) -> <Self as CmpGe<Rhs>>::Outputwhere
Self: CmpGe<Rhs>,
Returns a mask that checks if each element of self is greater than
or equal to the corresponding element of other.
Sourcepub fn select(self, if_true: Self, if_false: Self) -> Self
pub fn select(self, if_true: Self, if_false: Self) -> Self
Elementwise selection.
For each element of self:
- If all bits are one, return the corresponding element of
if_true - If all bits are zero, return the corresponding element of
if_false
This function assumes self is a mask, meaning each element is
either all zeros or all ones. For bitwise selection use bitselect.
Sourcepub fn to_bitmask(self) -> u32
pub fn to_bitmask(self) -> u32
Converts to a bitmask, where each bit is 1 if the element of self
is true or 0 if the element of self is false.
Each bit of the output corresponds to an element of self. The least
significant bit corresponds to the lowest element. Remaining bits are
0.
This function assumes self is a mask, meaning each element is
either all zeros or all ones. If the input is not a mask, the result
is unspecified.
Sourcepub fn any(self) -> bool
pub fn any(self) -> bool
Returns true if any element of self is true.
This function assumes self is a mask, meaning each element is
either all zeros or all ones. If the input is not a mask, the result
is unspecified.
Sourcepub fn all(self) -> bool
pub fn all(self) -> bool
Returns true if all elements of self are true.
This function assumes self is a mask, meaning each element is
either all zeros or all ones. If the input is not a mask, the result
is unspecified.
Sourcepub fn none(self) -> bool
pub fn none(self) -> bool
Returns true if none of the elements of self are true.
This function assumes self is a mask, meaning each element is
either all zeros or all ones. If the input is not a mask, the result
is unspecified.
Sourcepub fn transpose(data: [f64x8; 8]) -> [f64x8; 8]
pub fn transpose(data: [f64x8; 8]) -> [f64x8; 8]
Transposes an array of SIMD vectors interpreted as a square matrix.
Currently this function is never accelerated.
Sourcepub fn blend(self, if_true: Self, if_false: Self) -> Self
👎Deprecated since 1.6.0: split into select and bitselect functions
pub fn blend(self, if_true: Self, if_false: Self) -> Self
split into select and bitselect functions
Elementwise selection.
For each element of self:
- If all bits are one, return the corresponding element of
if_true - If all bits are zero, return the corresponding element of
if_false
Originally this function did not specify whether it supported per-bit
selection, or if it assumed self is a mask, meaning each element
is either all zeros or all ones (for better performance). Because of
this, blend has been split into two new functions: select and
bitselect.
Source§impl f64x8
The following functionality exists for all SIMD vectors of floats.
impl f64x8
The following functionality exists for all SIMD vectors of floats.
Sourcepub const EPSILON: Self
pub const EPSILON: Self
A SIMD vector with all elements set to f64::EPSILON.
Sourcepub const MIN_POSITIVE: Self
pub const MIN_POSITIVE: Self
A SIMD vector with all elements set to f64::MIN_POSITIVE.
Sourcepub const INFINITY: Self
pub const INFINITY: Self
A SIMD vector with all elements set to f64::INFINITY.
Sourcepub const NEG_INFINITY: Self
pub const NEG_INFINITY: Self
A SIMD vector with all elements set to f64::NEG_INFINITY.
Sourcepub const E: Self
pub const E: Self
A SIMD vector with all elements set to Euler’s number (e).
Sourcepub const FRAC_2_SQRT_PI: Self
pub const FRAC_2_SQRT_PI: Self
A SIMD vector with all elements set to 2/sqrt(π).
Sourcepub const FRAC_1_SQRT_2: Self
pub const FRAC_1_SQRT_2: Self
A SIMD vector with all elements set to 1/sqrt(2).
Sourcepub const PI: Self
pub const PI: Self
A SIMD vector with all elements set to Archimedes’ constant (π).
Sourcepub const TAU: Self
pub const TAU: Self
A SIMD vector with all elements set to the full circle constant (τ).
Equal to 2π.
Sourcepub fn reduce_add(self) -> f64
pub fn reduce_add(self) -> f64
Reducing addition. Returns the sum of the vector’s elements.
Equivalent to self[0] + self[1] + ....
§Unspecified precision
The order of addition is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn reduce_mul(self) -> f64
pub fn reduce_mul(self) -> f64
Reducing multiplication. Returns the product of the vector’s elements.
Equivalent to self[0] * self[1] * ....
§Unspecified precision
The order of multiplication is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn is_inf(self) -> Self
pub fn is_inf(self) -> Self
Returns a mask that checks if each element is infinity (either positive or negative).
Sourcepub fn is_finite(self) -> Self
pub fn is_finite(self) -> Self
Returns a mask that checks if each element is neither infinite nor NaN.
Sourcepub fn is_sign_positive(self) -> Self
pub fn is_sign_positive(self) -> Self
Returns a mask that checks if each element has a positive sign,
including +0.0, NaNs with positive sign bit and positive infinity.
Sourcepub fn is_sign_negative(self) -> Self
pub fn is_sign_negative(self) -> Self
Returns a mask that checks if each element has a negative sign,
including -0.0, NaNs with negative sign bit and negative infinity.
Sourcepub fn recip(self) -> Self
pub fn recip(self) -> Self
Returns the reciprocal (inverse) of a number, 1/x.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
To compute the reciprocal deterministically, use f64x8::ONE / x.
Sourcepub fn recip_sqrt(self) -> Self
pub fn recip_sqrt(self) -> Self
Returns the square root of the reciprocal (inverse) of a number,
sqrt(1/x).
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn to_degrees(self) -> Self
pub fn to_degrees(self) -> Self
Converts radians to degrees.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn to_radians(self) -> Self
pub fn to_radians(self) -> Self
Converts degrees to radians.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn max(self, rhs: Self) -> Self
pub fn max(self, rhs: Self) -> Self
Returns the maximum between each element of self and the
corresponding element of other, ignoring NaN.
For each lane, if exactly one of the arguments is NaN, then the other
argument is returned. If both arguments are NaN, the return value is
NaN. If the inputs compare equal (such as for the case of +0.0 and
-0.0), either input may be returned non-deterministically.
See fast_max for a faster variant that does not handle NaNs.
Sourcepub fn fast_max(self, rhs: Self) -> Self
pub fn fast_max(self, rhs: Self) -> Self
Returns the maximum between each element of self and the
corresponding element of other, not specifying behavior for NaNs.
For each lane, if both arguments are NaN, the return value is NaN. If
the inputs compare equal (such as for the case of +0.0 and -0.0),
or if exactly one of the arguments is NaN, either input may be
returned non-deterministically.
See max for a slower variant that does handle NaNs.
Sourcepub fn min(self, rhs: Self) -> Self
pub fn min(self, rhs: Self) -> Self
Returns the minimum between each element of self and the
corresponding element of other, ignoring NaN.
For each lane, if exactly one of the arguments is NaN, then the other
argument is returned. If both arguments are NaN, the return value is
NaN. If the inputs compare equal (such as for the case of +0.0 and
-0.0), either input may be returned non-deterministically.
See fast_min for a faster variant that does not handle NaNs.
Sourcepub fn fast_min(self, rhs: Self) -> Self
pub fn fast_min(self, rhs: Self) -> Self
Returns the minimum between each element of self and the
corresponding element of other, not specifying behavior for NaNs.
For each lane, if both arguments are NaN, the return value is NaN. If
the inputs compare equal (such as for the case of +0.0 and -0.0),
or if exactly one of the arguments is NaN, either input may be
returned non-deterministically.
See min for a slower variant that does handle NaNs.
Sourcepub fn midpoint(self, other: Self) -> Self
pub fn midpoint(self, other: Self) -> Self
Calculates the midpoint (average) between self and other.
This returns NaN when either argument is NaN or if a combination of +inf and -inf is provided as arguments.
This function currently returns a less precise result than
f64::midpoint
in order to gain performance, but this may change in the future.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub const fn to_bits(self) -> u64x8
pub const fn to_bits(self) -> u64x8
Raw transmutation to unsigned integer vector.
Note that this function preserves the bitwise value, and not the numeric value.
Sourcepub const fn from_bits(bits: u64x8) -> Self
pub const fn from_bits(bits: u64x8) -> Self
Raw transmutation from unsigned integer vector.
Note that this function preserves the bitwise value, and not the numeric value.
Sourcepub fn clamp(self, min: Self, max: Self) -> Self
pub fn clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval unless it is NaN.
If self, min or max are NaN, the result is NaN. If min > max,
the result is min. If inputs compare equal (such as for the case of
+0.0 and -0.0), either input may be returned
non-deterministically.
See fast_clamp for a faster variant that does not handle min or
max being NaN.
Sourcepub fn fast_clamp(self, min: Self, max: Self) -> Self
pub fn fast_clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval unless it is NaN.
If self is NaN, the result is NaN. If min > max, the result is
min. If inputs compare equal (such as for the case of
+0.0 and -0.0), or if min or max are NaN, any input may be
returned non-deterministically.
See clamp for a slower variant that also handles min or max
being NaN.
Sourcepub fn abs(self) -> Self
pub fn abs(self) -> Self
Computes the absolute value of self.
This function always returns the precise result.
Sourcepub fn signum(self) -> Self
pub fn signum(self) -> Self
Returns numbers that represents the signs of each element.
1.0if the element is positive,+0.0orINFINITY-1.0if the element is negative,-0.0orNEG_INFINITY- NaN if the element is NaN
Sourcepub fn copysign(self, sign: Self) -> Self
pub fn copysign(self, sign: Self) -> Self
Returns numbers composed of the magnitudes of self and the signs of
sign.
Equal to self if the sign of self and sign are the same,
otherwise equal to -self. Even if self or sign are NaN, the
result is the exact bit pattern of self with the sign bit of sign.
Sourcepub fn flip_signs(self, sign: Self) -> Self
pub fn flip_signs(self, sign: Self) -> Self
Flips the sign of self based on the sign of sign.
If sign has a positive sign, the result is self. If sign has a
negative sign, the result is -self. Even if self or sign are
NaN, the result is the exact bit pattern of self with a sign flipped
based on the sign bit of sign.
Sourcepub fn floor(self) -> Self
pub fn floor(self) -> Self
Returns the largest integer less than or equal to each input element.
This function always returns the precise result.
Sourcepub fn ceil(self) -> Self
pub fn ceil(self) -> Self
Returns the smallest integer greater than or equal to each input element.
This function always returns the precise result.
Sourcepub fn round(self) -> Self
pub fn round(self) -> Self
Returns the nearest integer to each input element. If a value is
half-way between two integers, round away from 0.0.
This function always returns the precise result.
For most targets architectures, round is slower than
round_ties_even. If you do not care about the difference, consider
using that instead.
Sourcepub fn round_int(self) -> i64x8
pub fn round_int(self) -> i64x8
Returns the nearest integer to each input element.
The result for values half-way between two integers is currently not specified.
This saturates out of range values and turns NaNs to 0. See
fast_round_int for a faster variant that does not handle out of
range values or NaNs.
Sourcepub fn fast_round_int(self) -> i64x8
pub fn fast_round_int(self) -> i64x8
Returns the nearest integer to each input element.
The result for values half-way between two integers is currently not specified.
This function does not handle out of range values or NaNs. See
round_int for a slower variant that does handle out of range
values and NaNs.
Sourcepub fn round_ties_even(self) -> Self
pub fn round_ties_even(self) -> Self
Returns the nearest integer to each input element. Rounds half-way cases to the number with an even least significant digit.
This function always returns the precise result.
Sourcepub fn trunc(self) -> Self
pub fn trunc(self) -> Self
Returns the integer part of each input element. This means that non-integer numbers are always truncated towards zero.
This function always returns the precise result.
Sourcepub fn trunc_int(self) -> i64x8
pub fn trunc_int(self) -> i64x8
Returns the integer part of each input element. This means that non-integer numbers are always truncated towards zero.
This saturates out of range values and turns NaNs to 0. See
fast_trunc_int for a faster variant that does not handle out of
range values or NaNs.
Sourcepub fn fast_trunc_int(self) -> i64x8
pub fn fast_trunc_int(self) -> i64x8
Returns the integer part of each input element. This means that non-integer numbers are always truncated towards zero.
This function does not handle out of range values or NaNs. See
trunc_int for a slower variant that does handle out of range
values and NaNs.
Sourcepub fn fract(self) -> Self
pub fn fract(self) -> Self
Returns the fractional part of each input element.
This function always returns the precise result.
Sourcepub fn mul_add(self, a: Self, b: Self) -> Self
pub fn mul_add(self, a: Self, b: Self) -> Self
Fused multiply-add. Computes (self * a) + b.
If there is hardware FMA support, this computes the result with only one rounding error. If not, this falls back to separate multiply and add operations, resulting in two rounding errors. Note that in the future, this function may change to always having one rounding error, at the cost of worse performance.
§Platform-specific behavior (may change in the future)
- On
x86/x86_64with AVX-512F+FMA: Uses 512-bitvfmadd(single rounding, best accuracy) - On
x86/x86_64with AVX-512F only: Uses(self * m) + a(two roundings) - Other platforms: Delegates to
f64x4(inherits its FMA behavior)
Sourcepub fn mul_sub(self, a: Self, b: Self) -> Self
pub fn mul_sub(self, a: Self, b: Self) -> Self
Fused multiply-sub. Computes (self * a) - b.
If there is hardware FMA support, this computes the result with only one rounding error. If not, this falls back to separate multiply and add operations, resulting in two rounding errors. Note that in the future, this function may change to always having one rounding error, at the cost of worse performance.
§Platform-specific behavior (may change in the future)
- On
x86/x86_64with AVX-512F+FMA: Uses 512-bitvfmsub(single rounding, best accuracy) - On
x86/x86_64with AVX-512F only: Uses(self * m) - s(two roundings) - Other platforms: Delegates to
f64x4(inherits its FMA behavior)
Sourcepub fn mul_neg_add(self, a: Self, b: Self) -> Self
pub fn mul_neg_add(self, a: Self, b: Self) -> Self
Fused multiply-negate-add. Computes -(self * a) + b.
If there is hardware FMA support, this computes the result with only one rounding error. If not, this falls back to separate multiply and add operations, resulting in two rounding errors. Note that in the future, this function may change to always having one rounding error, at the cost of worse performance.
§Platform-specific behavior (may change in the future)
- On
x86/x86_64with AVX-512F+FMA: Uses 512-bitvfnmadd(single rounding, best accuracy) - On
x86/x86_64with AVX-512F only: Usesa - (self * m)(two roundings) - Other platforms: Delegates to
f64x4(inherits its FMA behavior)
Sourcepub fn mul_neg_sub(self, a: Self, b: Self) -> Self
pub fn mul_neg_sub(self, a: Self, b: Self) -> Self
Fused multiply-negate-sub. Computes -(self * a) - b.
If there is hardware FMA support, this computes the result with only one rounding error. If not, this falls back to separate multiply and add operations, resulting in two rounding errors. Note that in the future, this function may change to always having one rounding error, at the cost of worse performance.
§Platform-specific behavior (may change in the future)
- On
x86/x86_64with AVX-512F+FMA: Uses 512-bitvfnmsub(single rounding, best accuracy) - On
x86/x86_64with AVX-512F only: Uses-(self * m) - s(two roundings) - Other platforms: Delegates to
f64x4(inherits its FMA behavior)
Sourcepub fn div_euclid(self, rhs: Self) -> Self
pub fn div_euclid(self, rhs: Self) -> Self
Calculates Euclidean division, the matching function for
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.
This function is not guaranteed to exactly match
f64::div_euclid.
Sourcepub fn rem_euclid(self, rhs: Self) -> Self
pub fn rem_euclid(self, rhs: Self) -> Self
Calculates the least nonnegative remainder of self when divided by
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)
approximately.
This function is not guaranteed to exactly match
f64::rem_euclid.
Sourcepub fn powf_simd(self, n: Self) -> Self
pub fn powf_simd(self, n: Self) -> Self
Raises each element of the number self to the corresponding element
of the floating point power n.
This function cannot be named simply powf, because a now deprecated
function already uses that name.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn sqrt(self) -> Self
pub fn sqrt(self) -> Self
Returns the square root of a number for each input element.
Returns NaN if self is a negative number other than -0.0.
This function always returns the precise result.
Sourcepub fn exp(self) -> Self
pub fn exp(self) -> Self
Returns e^(self), (the exponential function) for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it
varies by platform, version, and can even differ within the same
execution from one invocation to the next.
Calculate the exponent of a packed f64x8
Sourcepub fn exp2(self) -> Self
pub fn exp2(self) -> Self
Returns 2^(self) for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn ln(self) -> Self
pub fn ln(self) -> Self
Returns the natural logarithm of a number for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn log2(self) -> Self
pub fn log2(self) -> Self
Returns the base 2 logarithm of a number for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn log10(self) -> Self
pub fn log10(self) -> Self
Returns the base 10 logarithm of a number for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn cbrt(self) -> Self
pub fn cbrt(self) -> Self
Returns the cube root of a number for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn sin(self) -> Self
pub fn sin(self) -> Self
Computes the sine of a number (in radians) for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn cos(self) -> Self
pub fn cos(self) -> Self
Computes the cosine of a number (in radians) for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn tan(self) -> Self
pub fn tan(self) -> Self
Computes the tangent of a number (in radians) for each input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn asin(self) -> Self
pub fn asin(self) -> Self
Computes the arcsine of a number for each input element. Return value is in radians in the range [-pi/2, pi/2] or NaN if the number is outside the range [-1, 1].
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn acos(self) -> Self
pub fn acos(self) -> Self
Computes the arccosine of a number for each input element. Return value is in radians in the range [0, pi] or NaN if the number is outside the range [-1, 1].
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn atan(self) -> Self
pub fn atan(self) -> Self
Computes the arctangent of a number for each input element. Return value is in radians in the range [-pi/2, pi/2].
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn atan2(self, x: Self) -> Self
pub fn atan2(self, x: Self) -> Self
Computes the four quadrant arctangent of each element of self (y)
and the corresponding element of other (x) in radians.
x | y | Piecewise Definition | Range |
|---|---|---|---|
>= +0 | >= +0 | arctan(y/x) | [+0, +pi/2] |
>= +0 | <= -0 | arctan(y/x) | [-pi/2, -0] |
<= -0 | >= +0 | arctan(y/x) + pi | [+pi/2, +pi] |
<= -0 | <= -0 | arctan(y/x) - pi | [-pi, -pi/2] |
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn sin_cos(self) -> (Self, Self)
pub fn sin_cos(self) -> (Self, Self)
Simultaneously computes the sine and cosine of a number x for each
input element. Returns (sin(x), cos(x)).
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn asin_acos(self) -> (Self, Self)
pub fn asin_acos(self) -> (Self, Self)
Simultaneously computes the arcsine and arccosine of a number x for
each input element. Returns (asin(x), acos(x)).
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn exp_m1(self) -> Self
pub fn exp_m1(self) -> Self
Returns e^(self) - 1 for each input element in a way that is
accurate even if a number is close to zero.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn ln_1p(self) -> Self
pub fn ln_1p(self) -> Self
Returns ln(1+n) (natural logarithm) for each input element more
accurately than if the operations were performed separately.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn sinh(self) -> Self
pub fn sinh(self) -> Self
Returns the hyperbolic sine ((e^self - e^(-self))/2) for each input
element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn cosh(self) -> Self
pub fn cosh(self) -> Self
Returns the hyperbolic cosine ((e^self + e^(-self))/2) for each
input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn tanh(self) -> Self
pub fn tanh(self) -> Self
Returns the hyperbolic tangent (sinh(self)/cosh(self)) for each
input element.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn pow_f64x8(self, n: Self) -> Self
👎Deprecated since 1.6.0: renamed to powf_simd
pub fn pow_f64x8(self, n: Self) -> Self
renamed to powf_simd
Raises each element of the number self to the corresponding element
of the floating point power n.
This function has been renamed to powf_simd.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Sourcepub fn powf(self, n: f64) -> Self
👎Deprecated since 1.6.0: use x.powf_simd(splat(n)) instead
pub fn powf(self, n: f64) -> Self
use x.powf_simd(splat(n)) instead
Raises each element of the number self to the scalar floating point
power n.
This function has been deprecated because it raises all elements of
x to the same power, even though that brings no performance benefit.
Use x.powf_simd(f64x8::splat(n)) instead.
§Unspecified precision
The precision of this function is non-deterministic. This means it varies by platform, version, and can even differ within the same execution from one invocation to the next.
Trait Implementations§
Source§impl AddAssign for f64x8
impl AddAssign for f64x8
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Computes addition for each element of self and the corresponding
element of rhs.
This always returns the precise result.
Source§impl AddAssign<&f64> for f64x8
impl AddAssign<&f64> for f64x8
Source§fn add_assign(&mut self, rhs: &f64)
fn add_assign(&mut self, rhs: &f64)
Computes addition for each element of self and the uniform scalar
rhs.
This always returns the precise result.
Source§impl AddAssign<&f64x8> for f64x8
impl AddAssign<&f64x8> for f64x8
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
Computes addition for each element of self and the corresponding
element of rhs.
This always returns the precise result.
Source§impl AddAssign<f64> for f64x8
impl AddAssign<f64> for f64x8
Source§fn add_assign(&mut self, rhs: f64)
fn add_assign(&mut self, rhs: f64)
Computes addition for each element of self and the uniform scalar
rhs.
This always returns the precise result.
Source§impl AlignTo for f64x8
impl AlignTo for f64x8
Source§fn simd_align_to(
slice: &[Self::Elem],
) -> (&[Self::Elem], &[Self], &[Self::Elem])
fn simd_align_to( slice: &[Self::Elem], ) -> (&[Self::Elem], &[Self], &[Self::Elem])
align_to.Source§fn simd_align_to_mut(
slice: &mut [Self::Elem],
) -> (&mut [Self::Elem], &mut [Self], &mut [Self::Elem])
fn simd_align_to_mut( slice: &mut [Self::Elem], ) -> (&mut [Self::Elem], &mut [Self], &mut [Self::Elem])
align_to_mut.Source§impl BitAnd for f64x8
impl BitAnd for f64x8
Source§impl BitAnd<&f64> for f64x8
impl BitAnd<&f64> for f64x8
Source§impl BitAnd<&f64> for &f64x8
impl BitAnd<&f64> for &f64x8
Source§impl BitAnd<&f64x8> for f64x8
impl BitAnd<&f64x8> for f64x8
Source§impl BitAnd<&f64x8> for f64
impl BitAnd<&f64x8> for f64
Source§impl BitAnd<&f64x8> for &f64x8
impl BitAnd<&f64x8> for &f64x8
Source§impl BitAnd<&f64x8> for &f64
impl BitAnd<&f64x8> for &f64
Source§impl BitAnd<f64> for f64x8
impl BitAnd<f64> for f64x8
Source§impl BitAnd<f64> for &f64x8
impl BitAnd<f64> for &f64x8
Source§impl BitAnd<f64x8> for f64
impl BitAnd<f64x8> for f64
Source§impl BitAnd<f64x8> for &f64x8
impl BitAnd<f64x8> for &f64x8
Source§impl BitAnd<f64x8> for &f64
impl BitAnd<f64x8> for &f64
Source§impl BitAndAssign for f64x8
impl BitAndAssign for f64x8
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Computes bitwise AND for each element of self and the corresponding
element of rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitAndAssign<&f64> for f64x8
impl BitAndAssign<&f64> for f64x8
Source§fn bitand_assign(&mut self, rhs: &f64)
fn bitand_assign(&mut self, rhs: &f64)
Computes bitwise AND for each element of self and the uniform scalar
rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitAndAssign<&f64x8> for f64x8
impl BitAndAssign<&f64x8> for f64x8
Source§fn bitand_assign(&mut self, rhs: &Self)
fn bitand_assign(&mut self, rhs: &Self)
Computes bitwise AND for each element of self and the corresponding
element of rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitAndAssign<f64> for f64x8
impl BitAndAssign<f64> for f64x8
Source§fn bitand_assign(&mut self, rhs: f64)
fn bitand_assign(&mut self, rhs: f64)
Computes bitwise AND for each element of self and the uniform scalar
rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitOr for f64x8
impl BitOr for f64x8
Source§impl BitOr<&f64> for f64x8
impl BitOr<&f64> for f64x8
Source§impl BitOr<&f64> for &f64x8
impl BitOr<&f64> for &f64x8
Source§impl BitOr<&f64x8> for f64x8
impl BitOr<&f64x8> for f64x8
Source§impl BitOr<&f64x8> for f64
impl BitOr<&f64x8> for f64
Source§impl BitOr<&f64x8> for &f64x8
impl BitOr<&f64x8> for &f64x8
Source§impl BitOr<&f64x8> for &f64
impl BitOr<&f64x8> for &f64
Source§impl BitOr<f64> for f64x8
impl BitOr<f64> for f64x8
Source§impl BitOr<f64> for &f64x8
impl BitOr<f64> for &f64x8
Source§impl BitOr<f64x8> for f64
impl BitOr<f64x8> for f64
Source§impl BitOr<f64x8> for &f64x8
impl BitOr<f64x8> for &f64x8
Source§impl BitOr<f64x8> for &f64
impl BitOr<f64x8> for &f64
Source§impl BitOrAssign for f64x8
impl BitOrAssign for f64x8
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Computes bitwise OR for each element of self and the corresponding
element of rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitOrAssign<&f64> for f64x8
impl BitOrAssign<&f64> for f64x8
Source§fn bitor_assign(&mut self, rhs: &f64)
fn bitor_assign(&mut self, rhs: &f64)
Computes bitwise OR for each element of self and the uniform scalar
rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitOrAssign<&f64x8> for f64x8
impl BitOrAssign<&f64x8> for f64x8
Source§fn bitor_assign(&mut self, rhs: &Self)
fn bitor_assign(&mut self, rhs: &Self)
Computes bitwise OR for each element of self and the corresponding
element of rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitOrAssign<f64> for f64x8
impl BitOrAssign<f64> for f64x8
Source§fn bitor_assign(&mut self, rhs: f64)
fn bitor_assign(&mut self, rhs: f64)
Computes bitwise OR for each element of self and the uniform scalar
rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitXor for f64x8
impl BitXor for f64x8
Source§impl BitXor<&f64> for f64x8
impl BitXor<&f64> for f64x8
Source§impl BitXor<&f64> for &f64x8
impl BitXor<&f64> for &f64x8
Source§impl BitXor<&f64x8> for f64x8
impl BitXor<&f64x8> for f64x8
Source§impl BitXor<&f64x8> for f64
impl BitXor<&f64x8> for f64
Source§impl BitXor<&f64x8> for &f64x8
impl BitXor<&f64x8> for &f64x8
Source§impl BitXor<&f64x8> for &f64
impl BitXor<&f64x8> for &f64
Source§impl BitXor<f64> for f64x8
impl BitXor<f64> for f64x8
Source§impl BitXor<f64> for &f64x8
impl BitXor<f64> for &f64x8
Source§impl BitXor<f64x8> for f64
impl BitXor<f64x8> for f64
Source§impl BitXor<f64x8> for &f64x8
impl BitXor<f64x8> for &f64x8
Source§impl BitXor<f64x8> for &f64
impl BitXor<f64x8> for &f64
Source§impl BitXorAssign for f64x8
impl BitXorAssign for f64x8
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Computes bitwise XOR for each element of self and the corresponding
element of rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitXorAssign<&f64> for f64x8
impl BitXorAssign<&f64> for f64x8
Source§fn bitxor_assign(&mut self, rhs: &f64)
fn bitxor_assign(&mut self, rhs: &f64)
Computes bitwise XOR for each element of self and the uniform scalar
rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitXorAssign<&f64x8> for f64x8
impl BitXorAssign<&f64x8> for f64x8
Source§fn bitxor_assign(&mut self, rhs: &Self)
fn bitxor_assign(&mut self, rhs: &Self)
Computes bitwise XOR for each element of self and the corresponding
element of rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl BitXorAssign<f64> for f64x8
impl BitXorAssign<f64> for f64x8
Source§fn bitxor_assign(&mut self, rhs: f64)
fn bitxor_assign(&mut self, rhs: f64)
Computes bitwise XOR for each element of self and the uniform scalar
rhs.
This operator is not implemented for primitive scalar floats, but its behavior here is the same as for integers.
Source§impl CmpEq for f64x8
impl CmpEq for f64x8
Source§impl CmpEq<f64> for f64x8
impl CmpEq<f64> for f64x8
Source§impl CmpGe for f64x8
impl CmpGe for f64x8
Source§impl CmpGe<f64> for f64x8
impl CmpGe<f64> for f64x8
Source§impl CmpGt for f64x8
impl CmpGt for f64x8
Source§impl CmpGt<f64> for f64x8
impl CmpGt<f64> for f64x8
Source§impl CmpLe for f64x8
impl CmpLe for f64x8
Source§impl CmpLe<f64> for f64x8
impl CmpLe<f64> for f64x8
Source§impl CmpLt for f64x8
impl CmpLt for f64x8
Source§impl CmpLt<f64> for f64x8
impl CmpLt<f64> for f64x8
Source§impl CmpNe for f64x8
impl CmpNe for f64x8
Source§impl CmpNe<f64> for f64x8
impl CmpNe<f64> for f64x8
impl Copy for f64x8
Source§impl DivAssign for f64x8
impl DivAssign for f64x8
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Computes division for each element of self and the corresponding
element of rhs.
This always returns the precise result.
Source§impl DivAssign<&f64> for f64x8
impl DivAssign<&f64> for f64x8
Source§fn div_assign(&mut self, rhs: &f64)
fn div_assign(&mut self, rhs: &f64)
Computes division for each element of self and the uniform scalar
rhs.
This always returns the precise result.
Source§impl DivAssign<&f64x8> for f64x8
impl DivAssign<&f64x8> for f64x8
Source§fn div_assign(&mut self, rhs: &Self)
fn div_assign(&mut self, rhs: &Self)
Computes division for each element of self and the corresponding
element of rhs.
This always returns the precise result.
Source§impl DivAssign<f64> for f64x8
impl DivAssign<f64> for f64x8
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Computes division for each element of self and the uniform scalar
rhs.
This always returns the precise result.
Source§impl MulAssign for f64x8
impl MulAssign for f64x8
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Computes multiplication for each element of self and the
corresponding element of rhs.
This always returns the precise result.
Source§impl MulAssign<&f64> for f64x8
impl MulAssign<&f64> for f64x8
Source§fn mul_assign(&mut self, rhs: &f64)
fn mul_assign(&mut self, rhs: &f64)
Computes multiplication for each element of self and the uniform
scalar rhs.
This always returns the precise result.
Source§impl MulAssign<&f64x8> for f64x8
impl MulAssign<&f64x8> for f64x8
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
Computes multiplication for each element of self and the
corresponding element of rhs.
This always returns the precise result.
Source§impl MulAssign<f64> for f64x8
impl MulAssign<f64> for f64x8
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Computes multiplication for each element of self and the uniform
scalar rhs.
This always returns the precise result.
impl Pod for f64x8
Source§impl RemAssign for f64x8
impl RemAssign for f64x8
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Computes the remainder for each element of self and the
corresponding element of rhs.
This always returns the precise result.
Source§impl RemAssign<&f64> for f64x8
impl RemAssign<&f64> for f64x8
Source§fn rem_assign(&mut self, rhs: &f64)
fn rem_assign(&mut self, rhs: &f64)
Computes the remainder for each element of self and the uniform
scalar rhs.
This always returns the precise result.
Source§impl RemAssign<&f64x8> for f64x8
impl RemAssign<&f64x8> for f64x8
Source§fn rem_assign(&mut self, rhs: &Self)
fn rem_assign(&mut self, rhs: &Self)
Computes the remainder for each element of self and the
corresponding element of rhs.
This always returns the precise result.
Source§impl RemAssign<f64> for f64x8
impl RemAssign<f64> for f64x8
Source§fn rem_assign(&mut self, rhs: f64)
fn rem_assign(&mut self, rhs: f64)
Computes the remainder for each element of self and the uniform
scalar rhs.
This always returns the precise result.
impl StructuralPartialEq for f64x8
Source§impl SubAssign for f64x8
impl SubAssign for f64x8
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Computes subtraction for each element of self and the corresponding
element of rhs.
This always returns the precise result.
Source§impl SubAssign<&f64> for f64x8
impl SubAssign<&f64> for f64x8
Source§fn sub_assign(&mut self, rhs: &f64)
fn sub_assign(&mut self, rhs: &f64)
Computes subtraction for each element of self and the uniform scalar
rhs.
This always returns the precise result.
Source§impl SubAssign<&f64x8> for f64x8
impl SubAssign<&f64x8> for f64x8
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
Computes subtraction for each element of self and the corresponding
element of rhs.
This always returns the precise result.
Source§impl SubAssign<f64> for f64x8
impl SubAssign<f64> for f64x8
Source§fn sub_assign(&mut self, rhs: f64)
fn sub_assign(&mut self, rhs: f64)
Computes subtraction for each element of self and the uniform scalar
rhs.
This always returns the precise result.
Auto Trait Implementations§
impl Freeze for f64x8
impl RefUnwindSafe for f64x8
impl Send for f64x8
impl Sync for f64x8
impl Unpin for f64x8
impl UnsafeUnpin for f64x8
impl UnwindSafe for f64x8
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.