pub trait SpecializedTranscendentalMath<E>: SpecializedCoreMath<E> {
Show 58 methods
// Required methods
fn sin_cos<P: Policy>(self) -> (Self, Self);
fn sinc<P: Policy>(self) -> Self;
fn sinhc<P: Policy>(self) -> Self;
fn atanhc<P: Policy>(self) -> Self;
fn sinh_cosh<P: Policy>(self) -> (Self, Self);
fn tanh<P: Policy>(self) -> Self;
fn asin<P: Policy>(self) -> Self;
fn acos<P: Policy>(self) -> Self;
fn atan<P: Policy>(self) -> Self;
fn asinh<P: Policy>(self) -> Self;
fn acosh<P: Policy>(self) -> Self;
fn atanh<P: Policy>(self) -> Self;
fn exp<P: Policy>(self) -> Self;
fn exph<P: Policy>(self) -> Self;
fn exp2<P: Policy>(self) -> Self;
fn exp10<P: Policy>(self) -> Self;
fn exp_m1<P: Policy>(self) -> Self;
fn exp2_m1<P: Policy>(self) -> Self;
fn exp10_m1<P: Policy>(self) -> Self;
fn powf<P: Policy>(self, e: Self) -> Self;
fn cbrt<P: Policy>(self) -> Self;
fn ln<P: Policy>(self) -> Self;
fn ln_1p<P: Policy>(self) -> Self;
fn log2<P: Policy>(self) -> Self;
fn log10<P: Policy>(self) -> Self;
fn log_n_n<P: Policy, const N: usize>(self) -> Self;
fn ln1m_expnx_ext<P: Policy>(self, lnx: Self) -> Self;
// Provided methods
fn sin<P: Policy>(self) -> Self { ... }
fn cos<P: Policy>(self) -> Self { ... }
fn tan<P: Policy>(self) -> Self { ... }
fn sincos_pi<P: Policy>(self) -> (Self, Self) { ... }
fn sin_pi<P: Policy>(self) -> Self { ... }
fn cos_pi<P: Policy>(self) -> Self { ... }
fn tan_pi<P: Policy>(self) -> Self { ... }
fn sinc_pi<P: Policy>(self) -> Self { ... }
fn xlog_guarded(x: Self, y: Self, ln_y: Self) -> Self { ... }
fn xlogy<P: Policy>(self, y: Self) -> Self { ... }
fn xlog1py<P: Policy>(self, y: Self) -> Self { ... }
fn sinh<P: Policy>(self) -> Self { ... }
fn cosh_m1<P: Policy>(self) -> Self { ... }
fn cosh<P: Policy>(self) -> Self { ... }
fn sqrt1pm1<P: Policy>(self) -> Self { ... }
fn sqrt1mexp<P: Policy>(self) -> Self { ... }
fn compound<P: Policy>(self, n: Self) -> Self { ... }
fn powf_m1<P: Policy>(self, e: Self) -> Self { ... }
fn compound_m1<P: Policy>(self, n: Self) -> Self { ... }
fn haversin<P: Policy>(self) -> Self { ... }
fn versin<P: Policy>(self) -> Self { ... }
fn versinc<P: Policy>(self) -> Self { ... }
fn cos_m1<P: Policy>(self) -> Self { ... }
fn nth_root_n<P: Policy, const N: usize>(self) -> Self { ... }
fn nth_root<P: Policy>(self, n: u32) -> Self { ... }
fn log2_p1<P: Policy>(self) -> Self { ... }
fn log10_p1<P: Policy>(self) -> Self { ... }
fn log1pmx<P: Policy>(self) -> Self { ... }
fn log_n<P: Policy>(self, n: u32) -> Self { ... }
fn log<P: Policy>(self, base: Self) -> Self { ... }
fn ln1m_expnx<P: Policy>(self) -> Self { ... }
}Required Methods§
fn sin_cos<P: Policy>(self) -> (Self, Self)
fn sinc<P: Policy>(self) -> Self
fn sinhc<P: Policy>(self) -> Self
fn atanhc<P: Policy>(self) -> Self
fn sinh_cosh<P: Policy>(self) -> (Self, Self)
fn tanh<P: Policy>(self) -> Self
fn asin<P: Policy>(self) -> Self
fn acos<P: Policy>(self) -> Self
fn atan<P: Policy>(self) -> Self
fn asinh<P: Policy>(self) -> Self
fn acosh<P: Policy>(self) -> Self
fn atanh<P: Policy>(self) -> Self
fn exp<P: Policy>(self) -> Self
fn exph<P: Policy>(self) -> Self
fn exp2<P: Policy>(self) -> Self
fn exp10<P: Policy>(self) -> Self
fn exp_m1<P: Policy>(self) -> Self
fn exp2_m1<P: Policy>(self) -> Self
fn exp10_m1<P: Policy>(self) -> Self
fn powf<P: Policy>(self, e: Self) -> Self
fn cbrt<P: Policy>(self) -> Self
fn ln<P: Policy>(self) -> Self
fn ln_1p<P: Policy>(self) -> Self
fn log2<P: Policy>(self) -> Self
fn log10<P: Policy>(self) -> Self
fn log_n_n<P: Policy, const N: usize>(self) -> Self
fn ln1m_expnx_ext<P: Policy>(self, lnx: Self) -> Self
Provided Methods§
fn sin<P: Policy>(self) -> Self
fn cos<P: Policy>(self) -> Self
fn tan<P: Policy>(self) -> Self
fn sincos_pi<P: Policy>(self) -> (Self, Self)
fn sin_pi<P: Policy>(self) -> Self
fn cos_pi<P: Policy>(self) -> Self
fn tan_pi<P: Policy>(self) -> Self
fn sinc_pi<P: Policy>(self) -> Self
Sourcefn xlog_guarded(x: Self, y: Self, ln_y: Self) -> Self
fn xlog_guarded(x: Self, y: Self, ln_y: Self) -> Self
x * ln_of_y, with x == 0 winning over an infinite log but a NaN y winning over
both. Shared by xlogy, xlog1py and
entr; the other two members of the family guard on the
sign of both arguments instead and cannot use it.
y is passed separately from its logarithm because the NaN test belongs to y: a
negative y makes the log NaN without being NaN itself, and there the zero guard
still applies.
fn xlogy<P: Policy>(self, y: Self) -> Self
fn xlog1py<P: Policy>(self, y: Self) -> Self
fn sinh<P: Policy>(self) -> Self
Sourcefn cosh_m1<P: Policy>(self) -> Self
fn cosh_m1<P: Policy>(self) -> Self
cosh(x) - 1 = 2 sinh^2(x/2), an exact identity, so no type needs to override this:
the composition inherits whatever accuracy that type’s sinh has, and near zero
sinh(x/2) is already x/2 to full relative precision, giving x^2/2 with no
cancellation anywhere. Same treatment as versin above.
fn cosh<P: Policy>(self) -> Self
fn sqrt1pm1<P: Policy>(self) -> Self
fn sqrt1mexp<P: Policy>(self) -> Self
fn compound<P: Policy>(self, n: Self) -> Self
fn powf_m1<P: Policy>(self, e: Self) -> Self
fn compound_m1<P: Policy>(self, n: Self) -> Self
fn haversin<P: Policy>(self) -> Self
fn versin<P: Policy>(self) -> Self
fn versinc<P: Policy>(self) -> Self
fn cos_m1<P: Policy>(self) -> Self
fn nth_root_n<P: Policy, const N: usize>(self) -> Self
Sourcefn nth_root<P: Policy>(self, n: u32) -> Self
fn nth_root<P: Policy>(self, n: u32) -> Self
The runtime twin of nth_root_n: the same arithmetic with the degree
as a value, so the two agree to the bit at every n. The special cases are one uniform
branch on n rather than a compile-time fold.
fn log2_p1<P: Policy>(self) -> Self
fn log10_p1<P: Policy>(self) -> Self
Sourcefn log1pmx<P: Policy>(self) -> Self
fn log1pmx<P: Policy>(self) -> Self
The direct form, which cancels near zero (see the trait method’s docs). Real f32/f64
vectors override this with generic::log1pmx_internal. The default exists so that
ordered-comparison-free types (Complex above all, which cannot select a window at
all) still get a correct answer rather than blocking the whole method.
fn log<P: Policy>(self, base: Self) -> Self
Sourcefn ln1m_expnx<P: Policy>(self) -> Self
fn ln1m_expnx<P: Policy>(self) -> Self
ln(1 - e^(-x))
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".