macro_rules! decl_strict_transcendentals_via_d38 {
($Type:ident) => {
impl<const SCALE: u32> $Type<SCALE> {
#[inline]
#[must_use]
pub fn ln_strict(self) -> Self {
<Self as $crate::policy::ln::LnPolicy>::ln_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn log2_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.log2_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log2_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn log10_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.log10_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log10_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn exp_strict(self) -> Self {
<Self as $crate::policy::exp::ExpPolicy>::exp_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn exp2_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.exp2_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::exp2_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn sqrt_strict(self) -> Self {
<Self as $crate::policy::sqrt::SqrtPolicy>::sqrt_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn cbrt_strict(self) -> Self {
<Self as $crate::policy::cbrt::CbrtPolicy>::cbrt_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn sin_strict(self) -> Self {
<Self as $crate::policy::trig::TrigPolicy>::sin_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn cos_strict(self) -> Self {
<Self as $crate::policy::trig::TrigPolicy>::cos_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn tan_strict(self) -> Self {
<Self as $crate::policy::trig::TrigPolicy>::tan_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn asin_strict(self) -> Self {
<Self as $crate::policy::trig::TrigPolicy>::asin_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn acos_strict(self) -> Self {
<Self as $crate::policy::trig::TrigPolicy>::acos_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn atan_strict(self) -> Self {
<Self as $crate::policy::trig::TrigPolicy>::atan_impl(
self,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn sinh_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.sinh_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::sinh_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn cosh_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.cosh_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::cosh_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn tanh_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.tanh_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::tanh_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn asinh_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.asinh_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::asinh_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn acosh_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.acosh_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::acosh_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn atanh_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.atanh_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atanh_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn to_degrees_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.to_degrees_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::to_degrees_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn to_radians_strict(self) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.to_radians_strict())
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::to_radians_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn log_strict(self, base: Self) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_base: $crate::types::widths::D38<SCALE> = base.into();
::core::convert::TryInto::try_into(wide_self.log_strict(wide_base))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn atan2_strict(self, other: Self) -> Self {
<Self as $crate::policy::trig::TrigPolicy>::atan2_impl(
self,
other,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn powf_strict(self, exp: Self) -> Self {
<Self as $crate::policy::pow::PowPolicy>::powf_impl(
self,
exp,
$crate::support::rounding::DEFAULT_ROUNDING_MODE,
)
}
#[inline]
#[must_use]
pub fn ln_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.ln_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::ln_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn ln_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.ln_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::ln_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn ln_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.ln_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::ln_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn log_strict_with(self, base: Self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_base: $crate::types::widths::D38<SCALE> = base.into();
::core::convert::TryInto::try_into(wide_self.log_strict_with(wide_base, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn log_approx(self, base: Self, working_digits: u32) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_base: $crate::types::widths::D38<SCALE> = base.into();
::core::convert::TryInto::try_into(wide_self.log_approx(wide_base, working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn log_approx_with(self, base: Self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_base: $crate::types::widths::D38<SCALE> = base.into();
::core::convert::TryInto::try_into(wide_self.log_approx_with(wide_base, working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn log2_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.log2_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log2_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn log2_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.log2_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log2_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn log2_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.log2_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log2_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn log10_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.log10_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log10_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn log10_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.log10_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log10_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn log10_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.log10_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::log10_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn exp_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.exp_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::exp_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn exp_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.exp_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::exp_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn exp_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.exp_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::exp_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn exp2_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.exp2_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::exp2_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn exp2_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.exp2_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::exp2_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn exp2_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.exp2_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::exp2_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn powf_strict_with(self, exp: Self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_exp: $crate::types::widths::D38<SCALE> = exp.into();
::core::convert::TryInto::try_into(wide_self.powf_strict_with(wide_exp, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::powf_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn powf_approx(self, exp: Self, working_digits: u32) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_exp: $crate::types::widths::D38<SCALE> = exp.into();
::core::convert::TryInto::try_into(wide_self.powf_approx(wide_exp, working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::powf_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn powf_approx_with(self, exp: Self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_exp: $crate::types::widths::D38<SCALE> = exp.into();
::core::convert::TryInto::try_into(wide_self.powf_approx_with(wide_exp, working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::powf_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn sqrt_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.sqrt_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::sqrt_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn cbrt_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.cbrt_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::cbrt_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn hypot_strict(self, other: Self) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_other: $crate::types::widths::D38<SCALE> = other.into();
::core::convert::TryInto::try_into(wide_self.hypot_strict(wide_other))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::hypot_strict"), SCALE))
}
#[inline]
#[must_use]
pub fn hypot_strict_with(self, other: Self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_other: $crate::types::widths::D38<SCALE> = other.into();
::core::convert::TryInto::try_into(wide_self.hypot_strict_with(wide_other, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::hypot_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn sin_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.sin_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::sin_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn sin_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.sin_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::sin_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn sin_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.sin_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::sin_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn cos_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.cos_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::cos_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn cos_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.cos_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::cos_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn cos_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.cos_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::cos_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn tan_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.tan_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::tan_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn tan_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.tan_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::tan_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn tan_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.tan_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::tan_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn atan_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.atan_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atan_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn atan_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.atan_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atan_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn atan_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.atan_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atan_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn asin_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.asin_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::asin_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn asin_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.asin_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::asin_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn asin_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.asin_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::asin_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn acos_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.acos_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::acos_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn acos_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.acos_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::acos_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn acos_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.acos_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::acos_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn atan2_strict_with(self, other: Self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_other: $crate::types::widths::D38<SCALE> = other.into();
::core::convert::TryInto::try_into(wide_self.atan2_strict_with(wide_other, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atan2_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn atan2_approx(self, other: Self, working_digits: u32) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_other: $crate::types::widths::D38<SCALE> = other.into();
::core::convert::TryInto::try_into(wide_self.atan2_approx(wide_other, working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atan2_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn atan2_approx_with(self, other: Self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide_self: $crate::types::widths::D38<SCALE> = self.into();
let wide_other: $crate::types::widths::D38<SCALE> = other.into();
::core::convert::TryInto::try_into(wide_self.atan2_approx_with(wide_other, working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atan2_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn sinh_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.sinh_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::sinh_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn sinh_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.sinh_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::sinh_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn sinh_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.sinh_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::sinh_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn cosh_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.cosh_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::cosh_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn cosh_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.cosh_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::cosh_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn cosh_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.cosh_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::cosh_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn tanh_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.tanh_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::tanh_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn tanh_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.tanh_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::tanh_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn tanh_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.tanh_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::tanh_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn asinh_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.asinh_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::asinh_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn asinh_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.asinh_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::asinh_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn asinh_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.asinh_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::asinh_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn acosh_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.acosh_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::acosh_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn acosh_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.acosh_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::acosh_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn acosh_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.acosh_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::acosh_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn atanh_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.atanh_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atanh_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn atanh_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.atanh_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atanh_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn atanh_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.atanh_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::atanh_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn to_degrees_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.to_degrees_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::to_degrees_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn to_degrees_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.to_degrees_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::to_degrees_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn to_degrees_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.to_degrees_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::to_degrees_approx_with"), SCALE))
}
#[inline]
#[must_use]
pub fn to_radians_strict_with(self, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.to_radians_strict_with(mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::to_radians_strict_with"), SCALE))
}
#[inline]
#[must_use]
pub fn to_radians_approx(self, working_digits: u32) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.to_radians_approx(working_digits))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::to_radians_approx"), SCALE))
}
#[inline]
#[must_use]
pub fn to_radians_approx_with(self, working_digits: u32, mode: $crate::support::rounding::RoundingMode) -> Self {
let wide: $crate::types::widths::D38<SCALE> = self.into();
::core::convert::TryInto::try_into(wide.to_radians_approx_with(working_digits, mode))
.unwrap_or_else(|_| $crate::support::diagnostics::overflow_panic_with_scale(concat!(stringify!($Type), "::to_radians_approx_with"), SCALE))
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn ln(self) -> Self {
self.ln_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn log2(self) -> Self {
self.log2_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn log10(self) -> Self {
self.log10_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn exp(self) -> Self {
self.exp_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn exp2(self) -> Self {
self.exp2_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn sqrt(self) -> Self {
self.sqrt_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn cbrt(self) -> Self {
self.cbrt_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn sin(self) -> Self {
self.sin_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn cos(self) -> Self {
self.cos_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn tan(self) -> Self {
self.tan_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn asin(self) -> Self {
self.asin_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn acos(self) -> Self {
self.acos_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn atan(self) -> Self {
self.atan_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn sinh(self) -> Self {
self.sinh_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn cosh(self) -> Self {
self.cosh_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn tanh(self) -> Self {
self.tanh_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn asinh(self) -> Self {
self.asinh_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn acosh(self) -> Self {
self.acosh_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn atanh(self) -> Self {
self.atanh_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn to_degrees(self) -> Self {
self.to_degrees_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn to_radians(self) -> Self {
self.to_radians_strict()
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn log(self, base: Self) -> Self {
self.log_strict(base)
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn atan2(self, other: Self) -> Self {
self.atan2_strict(other)
}
#[cfg(not(all(feature = "fast", not(feature = "strict"))))]
#[inline]
#[must_use]
pub fn powf(self, exp: Self) -> Self {
self.powf_strict(exp)
}
}
};
}
pub(crate) use decl_strict_transcendentals_via_d38;