#![cfg_attr(any(feature = "d57", feature = "wide"), doc = "| [`D57<SCALE>`] | 192-bit | 56 | `d57` or `wide` |")]
#![cfg_attr(not(any(feature = "d57", feature = "wide")), doc = "| `D57<SCALE>` | 192-bit | 56 | `d57` or `wide` |")]
#![cfg_attr(any(feature = "d76", feature = "wide"), doc = "| [`D76<SCALE>`] | 256-bit | 75 | `d76` or `wide` |")]
#![cfg_attr(not(any(feature = "d76", feature = "wide")), doc = "| `D76<SCALE>` | 256-bit | 75 | `d76` or `wide` |")]
#![cfg_attr(any(feature = "d115", feature = "wide"), doc = "| [`D115<SCALE>`] | 384-bit | 114 | `d115` or `wide` |")]
#![cfg_attr(not(any(feature = "d115", feature = "wide")), doc = "| `D115<SCALE>` | 384-bit | 114 | `d115` or `wide` |")]
#![cfg_attr(any(feature = "d153", feature = "wide"), doc = "| [`D153<SCALE>`] | 512-bit | 152 | `d153` or `wide` |")]
#![cfg_attr(not(any(feature = "d153", feature = "wide")), doc = "| `D153<SCALE>` | 512-bit | 152 | `d153` or `wide` |")]
#![cfg_attr(any(feature = "d230", feature = "wide"), doc = "| [`D230<SCALE>`] | 768-bit | 229 | `d230` or `wide` |")]
#![cfg_attr(not(any(feature = "d230", feature = "wide")), doc = "| `D230<SCALE>` | 768-bit | 229 | `d230` or `wide` |")]
#![cfg_attr(any(feature = "d307", feature = "wide"), doc = "| [`D307<SCALE>`] | 1024-bit | 306 | `d307` or `wide` |")]
#![cfg_attr(not(any(feature = "d307", feature = "wide")), doc = "| `D307<SCALE>` | 1024-bit | 306 | `d307` or `wide` |")]
#![cfg_attr(any(feature = "d462", feature = "x-wide"), doc = "| [`D462<SCALE>`] | 1536-bit | 461 | `d462` or `x-wide` |")]
#![cfg_attr(not(any(feature = "d462", feature = "x-wide")), doc = "| `D462<SCALE>` | 1536-bit | 461 | `d462` or `x-wide` |")]
#![cfg_attr(any(feature = "d616", feature = "x-wide"), doc = "| [`D616<SCALE>`] | 2048-bit | 615 | `d616` or `x-wide` |")]
#![cfg_attr(not(any(feature = "d616", feature = "x-wide")), doc = "| `D616<SCALE>` | 2048-bit | 615 | `d616` or `x-wide` |")]
#![cfg_attr(any(feature = "d924", feature = "xx-wide"), doc = "| [`D924<SCALE>`] | 3072-bit | 923 | `d924` or `xx-wide` |")]
#![cfg_attr(not(any(feature = "d924", feature = "xx-wide")), doc = "| `D924<SCALE>` | 3072-bit | 923 | `d924` or `xx-wide` |")]
#![cfg_attr(any(feature = "d1232", feature = "xx-wide"), doc = "| [`D1232<SCALE>`] | 4096-bit | 1231 | `d1232` or `xx-wide` |")]
#![cfg_attr(not(any(feature = "d1232", feature = "xx-wide")), doc = "| `D1232<SCALE>` | 4096-bit | 1231 | `d1232` or `xx-wide` |")]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(feature = "experimental-floats", feature(f16, f128))]
#![cfg_attr(
any(feature = "cross-scale-ops", feature = "exact-scratch-nightly"),
feature(generic_const_exprs)
)]
#![cfg_attr(
any(feature = "cross-scale-ops", feature = "exact-scratch-nightly"),
allow(incomplete_features)
)]
#![allow(
// Decimal width names overlap with type prefixes; the lint adds no
// signal here.
clippy::module_name_repetitions,
// We use unindented Markdown continuation in module docs.
clippy::doc_lazy_continuation,
// We routinely place a blank line between a method's `#[cfg]`
// attribute and its doc/body for readability.
clippy::empty_line_after_outer_attr,
// Big-integer arithmetic regularly casts between signed/unsigned
// and between widths. The wraps / truncations / sign flips are
// intentional — `unsigned_abs` paths, two's-complement tricks,
// narrowing the final result back to storage after a widened mul.
clippy::cast_possible_truncation,
clippy::cast_possible_wrap,
clippy::cast_sign_loss,
// We prefer `as` casts over `T::from(x)` in arithmetic-heavy
// inner loops for readability and to match the surrounding
// big-integer idiom.
clippy::cast_lossless,
// Float bridges (`to_f64`, `to_f32`) are explicitly lossy by
// contract. The lint is a tautology here.
clippy::cast_precision_loss,
// Literals like `1_000_000_000_000` carry the scale visually and
// are kept unseparated when they encode `10^SCALE`.
clippy::unreadable_literal,
// `if cond { panic!(…) }` is the crate's canonical bounds-check
// shape; `assert!(…)` would lose the dynamic message.
clippy::manual_assert,
// `Result<_, ()>` is the only honest error type for `const fn`
// digit-validity checks where no allocator is available.
clippy::result_unit_err,
// `if …; if …` chains read more cleanly than `if … && …` in the
// const-fn limb-arithmetic helpers.
clippy::collapsible_if,
// Big-int / fixed-point inner loops use `i`, `j`, `k`, `n`, `m`
// as conventional names. Renaming to `outer_index` etc. hurts
// readability without payoff.
clippy::similar_names,
clippy::many_single_char_names,
// Strict-transcendental kernels exceed 100 lines because they
// unroll a series-evaluation loop; splitting them just to please
// the line-count lint would scatter the algorithm.
clippy::too_many_lines,
// `#[inline(always)]` is set deliberately on small hot-path
clippy::inline_always,
clippy::float_cmp,
clippy::manual_let_else,
clippy::format_push_string,
clippy::comparison_chain,
clippy::must_use_candidate,
clippy::return_self_not_must_use,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::doc_markdown,
)]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "perf-trace")]
#[doc(hidden)]
pub use ::tracing;
mod algo_x_support;
mod algos;
mod consts;
mod identity;
mod support;
mod types;
#[cfg(feature = "bench-alt")]
#[doc(hidden)]
pub mod __bench_internals {
#[inline(never)]
pub fn mul_slice(a: &[u64], b: &[u64], out: &mut [u64]) {
crate::int::algos::mul::mul_schoolbook::mul_schoolbook(a, b, out)
}
#[inline(never)]
pub fn mul_low_u64<const N: usize>(a: &[u64; N], b: &[u64; N], out: &mut [u64; N]) {
crate::int::algos::mul::mul_schoolbook::mul_low_limb::<N, u64>(a, b, out)
}
#[inline(never)]
pub fn mul_low_u128<const N: usize>(a: &[u64; N], b: &[u64; N], out: &mut [u64; N]) {
crate::int::algos::mul::mul_schoolbook::mul_low_limb::<N, u128>(a, b, out)
}
macro_rules! mul_full_wrappers {
($u64name:ident, $n:literal) => {
#[inline(never)]
pub fn $u64name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64]) {
crate::int::algos::mul::mul_schoolbook::mul_full_limb::<$n, u64>(a, b, out)
}
};
($u64name:ident, $u128name:ident, $n:literal) => {
#[inline(never)]
pub fn $u64name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64]) {
crate::int::algos::mul::mul_schoolbook::mul_full_limb::<$n, u64>(a, b, out)
}
#[inline(never)]
pub fn $u128name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64]) {
crate::int::algos::mul::mul_schoolbook::mul_full_limb::<$n, u128>(a, b, out)
}
};
}
mul_full_wrappers!(mul_full_u64_2, mul_full_u128_2, 2);
mul_full_wrappers!(mul_full_u64_3, 3);
mul_full_wrappers!(mul_full_u64_4, mul_full_u128_4, 4);
mul_full_wrappers!(mul_full_u64_6, mul_full_u128_6, 6);
mul_full_wrappers!(mul_full_u64_8, mul_full_u128_8, 8);
mul_full_wrappers!(mul_full_u64_12, mul_full_u128_12, 12);
mul_full_wrappers!(mul_full_u64_16, mul_full_u128_16, 16);
mul_full_wrappers!(mul_full_u64_24, mul_full_u128_24, 24);
mul_full_wrappers!(mul_full_u64_32, mul_full_u128_32, 32);
mul_full_wrappers!(mul_full_u64_48, mul_full_u128_48, 48);
mul_full_wrappers!(mul_full_u64_64, mul_full_u128_64, 64);
mul_full_wrappers!(mul_full_u64_96, mul_full_u128_96, 96);
mul_full_wrappers!(mul_full_u64_128, mul_full_u128_128, 128);
mul_full_wrappers!(mul_full_u64_192, mul_full_u128_192, 192);
mul_full_wrappers!(mul_full_u64_256, mul_full_u128_256, 256);
#[inline(never)]
pub fn sqr_low_u64<const N: usize>(x: &[u64; N], out: &mut [u64; N]) {
crate::int::algos::sqr::sqr_low_limb::sqr_low_limb::<N, u64>(x, out)
}
#[inline(never)]
pub fn sqr_low_u128<const N: usize>(x: &[u64; N], out: &mut [u64; N]) {
crate::int::algos::sqr::sqr_low_limb::sqr_low_limb::<N, u128>(x, out)
}
#[inline(never)]
pub fn mul_fixed<const L: usize, const D: usize>(
a: &[u64; L],
b: &[u64; L],
out: &mut [u64; D],
) {
crate::int::algos::mul::mul_schoolbook::mul_schoolbook_fixed::<L, D>(a, b, out)
}
#[inline(never)]
pub fn mul_karatsuba_forced(a: &[u64], b: &[u64], out: &mut [u64], threshold: usize) {
crate::int::algos::mul::mul_karatsuba::mul_karatsuba_forced(a, b, out, threshold)
}
macro_rules! mul_kara_limb_wrappers {
($u64name:ident, $n:literal) => {
#[inline(never)]
pub fn $u64name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64]) {
crate::int::algos::mul::mul_karatsuba::mul_karatsuba_limb::<$n, u64>(a, b, out, $n)
}
};
($u64name:ident, $u128name:ident, $n:literal) => {
#[inline(never)]
pub fn $u64name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64]) {
crate::int::algos::mul::mul_karatsuba::mul_karatsuba_limb::<$n, u64>(a, b, out, $n)
}
#[inline(never)]
pub fn $u128name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64]) {
crate::int::algos::mul::mul_karatsuba::mul_karatsuba_limb::<$n, u128>(a, b, out, $n)
}
};
}
mul_kara_limb_wrappers!(mul_kara_u64_4, mul_kara_u128_4, 4);
mul_kara_limb_wrappers!(mul_kara_u64_6, mul_kara_u128_6, 6);
mul_kara_limb_wrappers!(mul_kara_u64_8, mul_kara_u128_8, 8);
mul_kara_limb_wrappers!(mul_kara_u64_12, mul_kara_u128_12, 12);
mul_kara_limb_wrappers!(mul_kara_u64_16, mul_kara_u128_16, 16);
mul_kara_limb_wrappers!(mul_kara_u64_24, mul_kara_u128_24, 24);
mul_kara_limb_wrappers!(mul_kara_u64_32, mul_kara_u128_32, 32);
mul_kara_limb_wrappers!(mul_kara_u64_48, mul_kara_u128_48, 48);
mul_kara_limb_wrappers!(mul_kara_u64_64, mul_kara_u128_64, 64);
mul_kara_limb_wrappers!(mul_kara_u64_96, mul_kara_u128_96, 96);
mul_kara_limb_wrappers!(mul_kara_u64_128, mul_kara_u128_128, 128);
mul_kara_limb_wrappers!(mul_kara_u64_192, mul_kara_u128_192, 192);
mul_kara_limb_wrappers!(mul_kara_u64_256, mul_kara_u128_256, 256);
macro_rules! mul_kara_u128_thresh {
($name:ident, $n:literal) => {
#[inline(never)]
pub fn $name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64], threshold: usize) {
crate::int::algos::mul::mul_karatsuba::mul_karatsuba_limb::<$n, u128>(a, b, out, threshold)
}
};
}
mul_kara_u128_thresh!(mul_kara_u128_64_t, 64);
mul_kara_u128_thresh!(mul_kara_u128_96_t, 96);
mul_kara_u128_thresh!(mul_kara_u128_128_t, 128);
mul_kara_u128_thresh!(mul_kara_u128_256_t, 256);
#[inline(never)]
pub fn mul_toom3_slice(a: &[u64], b: &[u64], out: &mut [u64]) {
crate::int::algos::mul::mul_toom3::mul_toom3(a, b, out)
}
macro_rules! mul_toom3_limb_wrappers {
($u64name:ident, $u128name:ident, $n:literal) => {
#[inline(never)]
pub fn $u64name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64]) {
crate::int::algos::mul::mul_toom3::mul_toom3_limb::<$n, u64>(a, b, out)
}
#[inline(never)]
pub fn $u128name(a: &[u64; $n], b: &[u64; $n], out: &mut [u64]) {
crate::int::algos::mul::mul_toom3::mul_toom3_limb::<$n, u128>(a, b, out)
}
};
}
mul_toom3_limb_wrappers!(mul_toom3_u64_24, mul_toom3_u128_24, 24);
mul_toom3_limb_wrappers!(mul_toom3_u64_32, mul_toom3_u128_32, 32);
mul_toom3_limb_wrappers!(mul_toom3_u64_48, mul_toom3_u128_48, 48);
mul_toom3_limb_wrappers!(mul_toom3_u64_64, mul_toom3_u128_64, 64);
mul_toom3_limb_wrappers!(mul_toom3_u64_96, mul_toom3_u128_96, 96);
mul_toom3_limb_wrappers!(mul_toom3_u64_128, mul_toom3_u128_128, 128);
mul_toom3_limb_wrappers!(mul_toom3_u64_192, mul_toom3_u128_192, 192);
mul_toom3_limb_wrappers!(mul_toom3_u64_256, mul_toom3_u128_256, 256);
#[inline(never)]
pub fn div_knuth_slice(num: &[u64], den: &[u64], quot: &mut [u64], rem: &mut [u64]) {
crate::int::algos::div::div_knuth::div_knuth(num, den, quot, rem)
}
#[inline(never)]
pub fn div_dispatch_slice(num: &[u64], den: &[u64], quot: &mut [u64], rem: &mut [u64]) {
crate::int::policy::div_rem::dispatch(num, den, quot, rem)
}
#[inline(never)]
pub fn div_knuth_u128_limb_slice(num: &[u64], den: &[u64], quot: &mut [u64], rem: &mut [u64]) {
crate::int::algos::div::div_knuth_u128_limb::div_knuth_u128_limb(num, den, quot, rem)
}
#[inline(never)]
pub fn div_bz_forced_slice(num: &[u64], den: &[u64], quot: &mut [u64], rem: &mut [u64]) {
crate::int::algos::div::div_burnikel_ziegler_with_knuth::bz_chunk_core_forced(
num, den, quot, rem,
)
}
#[inline(never)]
pub fn div_rem_fast_slice(num: &[u64], den: &[u64], quot: &mut [u64], rem: &mut [u64]) {
crate::int::algos::div::div_rem::div_rem(num, den, quot, rem)
}
#[inline(never)]
pub fn div_schoolbook_slice(num: &[u64], den: &[u64], quot: &mut [u64], rem: &mut [u64]) {
crate::int::algos::div::div_rem_schoolbook::div_rem_schoolbook(num, den, quot, rem)
}
#[inline(never)]
#[allow(private_bounds)]
pub fn hypot_pythagoras<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> Option<crate::int::types::Int<N>>
where
crate::int::types::compute_limbs::Limbs<N>: crate::int::types::compute_limbs::ComputeLimbs,
{
crate::int::algos::hypot::hypot_pythagoras::hypot_pythagoras::<N>(a, b, mode)
}
#[inline(never)]
#[allow(private_bounds)]
pub fn hypot_u128_fast<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> Option<crate::int::types::Int<N>>
where
crate::int::types::compute_limbs::Limbs<N>: crate::int::types::compute_limbs::ComputeLimbs,
{
crate::int::algos::hypot::hypot_u128_fast::hypot_u128_fast::<N>(a, b, mode)
}
#[inline(never)]
pub fn rem_native<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
crate::int::algos::rem::rem_native::rem_native::<N>(a, b)
}
#[inline(never)]
pub fn rem_via_div_rem<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
crate::int::algos::rem::rem_via_div_rem::rem_via_div_rem::<N>(a, b)
}
#[inline(never)]
pub fn rem_schoolbook<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
crate::int::algos::rem::rem_schoolbook::rem_schoolbook::<N>(a, b)
}
#[inline(never)]
pub fn rem_small_fast<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
crate::int::algos::rem::rem_small_fast::rem_small_fast::<N>(a, b)
}
#[inline(never)]
pub fn rem_native_direct<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
crate::int::algos::rem::rem_native_direct::rem_native_direct::<N>(a, b)
}
#[inline(never)]
pub fn sqr_half_product<const N: usize>(
x: crate::int::types::Uint<N>,
) -> crate::int::types::Uint<N> {
crate::int::algos::sqr::sqr_half_product::sqr_half_product::<N>(x)
}
#[inline(never)]
pub fn sqr_schoolbook<const N: usize>(
x: crate::int::types::Uint<N>,
) -> crate::int::types::Uint<N> {
crate::int::algos::sqr::sqr_schoolbook::sqr_schoolbook::<N>(x)
}
#[inline(never)]
pub fn pow_square_and_multiply<const N: usize>(
base: crate::int::types::Uint<N>,
exp: u32,
) -> crate::int::types::Uint<N> {
crate::int::algos::pow::pow_square_and_multiply::pow_square_and_multiply::<N>(base, exp)
}
#[inline(never)]
pub fn pow_schoolbook<const N: usize>(
base: crate::int::types::Uint<N>,
exp: u32,
) -> crate::int::types::Uint<N> {
crate::int::algos::pow::pow_schoolbook::pow_schoolbook::<N>(base, exp)
}
#[inline(never)]
pub fn isqrt_newton_slice(n: &[u64], out: &mut [u64]) {
crate::int::algos::isqrt::isqrt_newton::isqrt_newton(n, out)
}
#[inline(never)]
pub fn isqrt_schoolbook_slice(n: &[u64], out: &mut [u64]) {
crate::int::algos::isqrt::isqrt_schoolbook::isqrt_schoolbook(n, out)
}
#[inline(never)]
pub fn isqrt_native_fixed<const N: usize>(n: &[u64; N], out: &mut [u64; N]) {
crate::int::algos::isqrt::isqrt_mag_fixed::isqrt_mag_fixed::<N>(n, out)
}
#[inline(never)]
pub fn icbrt_newton_slice(n: &[u64], out: &mut [u64]) {
crate::int::algos::icbrt::icbrt_newton::icbrt_newton(n, out)
}
#[inline(never)]
pub fn icbrt_schoolbook_slice(n: &[u64], out: &mut [u64]) {
crate::int::algos::icbrt::icbrt_schoolbook::icbrt_schoolbook(n, out)
}
#[inline(never)]
pub fn isqrt_karatsuba_slice(n: &[u64], out: &mut [u64]) {
crate::int::algos::isqrt::isqrt_karatsuba::isqrt_karatsuba(n, out)
}
#[inline(never)]
pub fn icbrt_newton_recip_slice(n: &[u64], out: &mut [u64]) {
crate::int::algos::icbrt::icbrt_newton_recip::icbrt_newton_recip(n, out)
}
#[inline(never)]
pub fn cube_schoolbook<const N: usize>(
x: crate::int::types::Uint<N>,
) -> crate::int::types::Uint<N> {
crate::int::algos::cube::cube_schoolbook::cube_schoolbook::<N>(x)
}
#[inline(never)]
pub fn cube_fused_comba<const N: usize>(
x: crate::int::types::Uint<N>,
) -> crate::int::types::Uint<N> {
crate::int::algos::cube::cube_fused_comba::cube_fused_comba::<N>(x)
}
#[inline(never)]
pub fn eq_limbwise<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> bool {
crate::int::algos::eq::eq_limbwise::eq_limbwise::<N>(a, b)
}
#[inline(never)]
pub fn eq_xor_fold<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> bool {
crate::int::algos::eq::eq_xor_fold::eq_xor_fold::<N>(a, b)
}
macro_rules! sum_sq_wrappers {
($sb:ident, $cb:ident, $n:literal) => {
#[inline(never)]
pub fn $sb(
a: crate::int::types::Int<$n>,
b: crate::int::types::Int<$n>,
) -> Option<crate::int::types::Int<$n>> {
crate::int::algos::sum_sq::sum_sq_schoolbook::sum_sq_schoolbook::<$n>(a, b)
}
#[inline(never)]
pub fn $cb(
a: crate::int::types::Int<$n>,
b: crate::int::types::Int<$n>,
) -> Option<crate::int::types::Int<$n>> {
crate::int::algos::sum_sq::sum_sq_comba::sum_sq_comba::<$n>(a, b)
}
};
}
sum_sq_wrappers!(sum_sq_sb_n2, sum_sq_cb_n2, 2);
sum_sq_wrappers!(sum_sq_sb_n3, sum_sq_cb_n3, 3);
sum_sq_wrappers!(sum_sq_sb_n4, sum_sq_cb_n4, 4);
sum_sq_wrappers!(sum_sq_sb_n6, sum_sq_cb_n6, 6);
sum_sq_wrappers!(sum_sq_sb_n8, sum_sq_cb_n8, 8);
sum_sq_wrappers!(sum_sq_sb_n12, sum_sq_cb_n12, 12);
sum_sq_wrappers!(sum_sq_sb_n16, sum_sq_cb_n16, 16);
sum_sq_wrappers!(sum_sq_sb_n24, sum_sq_cb_n24, 24);
sum_sq_wrappers!(sum_sq_sb_n32, sum_sq_cb_n32, 32);
sum_sq_wrappers!(sum_sq_sb_n48, sum_sq_cb_n48, 48);
sum_sq_wrappers!(sum_sq_sb_n64, sum_sq_cb_n64, 64);
#[inline(never)]
pub fn dec_div_native<const N: usize, const SCALE: u32>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N> {
crate::algos::div::div_native::div_native::<N, SCALE>(a, b, mode)
}
#[inline(never)]
pub fn dec_div_widen_scale_n1(
a: crate::int::types::Int<1>,
b: crate::int::types::Int<1>,
mult: crate::int::types::Int<1>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<1> {
crate::algos::div::div_widen_scale::div_widen_scale::<1>(a, b, mult, mode)
}
#[inline(never)]
pub fn dec_div_widen_scale_n2(
a: crate::int::types::Int<2>,
b: crate::int::types::Int<2>,
mult: crate::int::types::Int<2>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<2> {
crate::algos::div::div_widen_scale::div_widen_scale::<2>(a, b, mult, mode)
}
#[inline(never)]
pub fn dec_mul_native<const N: usize, const SCALE: u32>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N> {
crate::algos::mul::mul_native::mul_native::<N, SCALE>(a, b, mode)
}
#[inline(never)]
pub fn dec_mul_widen_divide_n1<const SCALE: u32>(
a: crate::int::types::Int<1>,
b: crate::int::types::Int<1>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<1> {
crate::algos::mul::mul_widen_divide::mul_widen_divide::<1, SCALE>(a, b, mode)
}
#[inline(never)]
pub fn dec_mul_widen_divide_n2<const SCALE: u32>(
a: crate::int::types::Int<2>,
b: crate::int::types::Int<2>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<2> {
crate::algos::mul::mul_widen_divide::mul_widen_divide::<2, SCALE>(a, b, mode)
}
#[inline(never)]
#[allow(private_bounds)]
pub fn dec_mul_widen_divide<const N: usize, const SCALE: u32>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N>
where
crate::int::types::compute_limbs::Limbs<N>: crate::int::types::compute_limbs::ComputeLimbs,
{
crate::algos::mul::mul_widen_divide::mul_widen_divide::<N, SCALE>(a, b, mode)
}
#[inline(never)]
#[allow(private_bounds)]
pub fn dec_rem_int_layer<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N>
where
crate::int::types::compute_limbs::Limbs<N>: crate::int::types::compute_limbs::ComputeLimbs,
{
crate::algos::rem::rem_int_layer::rem_int_layer::<N>(a, b)
}
#[inline(never)]
#[allow(private_bounds)]
pub fn dec_rem_int_layer_divmod<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N>
where
crate::int::types::compute_limbs::Limbs<N>: crate::int::types::compute_limbs::ComputeLimbs,
{
crate::algos::rem::rem_int_layer::rem_int_layer_divmod::<N>(a, b)
}
#[inline(never)]
pub fn int_wrapping_rem_slice<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
a.wrapping_rem(b)
}
#[inline(never)]
pub fn dec_rem_native<const N: usize>(
a: crate::int::types::Int<N>,
b: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
crate::algos::rem::rem_native::rem_native::<N>(a, b)
}
#[inline(never)]
pub fn sqrt_mg<const SCALE: u32>(
raw: crate::int::types::Int<2>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<2> {
crate::algos::sqrt::sqrt_mg_divide::sqrt_mg_divide(raw, SCALE, mode)
}
#[inline(never)]
pub fn sqrt_newton_slice<const SCALE: u32>(
raw: crate::int::types::Int<2>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<2> {
crate::algos::sqrt::sqrt_newton::sqrt_newton::<2>(raw, SCALE, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn cbrt_native_d57s20(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::cbrt::cbrt_native::cbrt_native_d57s20(raw, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn cbrt_native_fast_3limb_s20(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::cbrt::cbrt_native_fast::cbrt_native_fast_a::<3, 6>(
raw,
const { crate::int::types::Int::<6>::TEN.pow(40) },
mode,
)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn cbrt_table_seed_d57s20(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::cbrt::cbrt_newton_with_table_seed::cbrt_newton_with_table_seed(raw, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn cbrt_newton_slice<const SCALE: u32>(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::cbrt::cbrt_newton::cbrt_newton::<3>(raw, SCALE, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn sqrt_native_w<const N: usize, const W: usize, const SCALE: u32>(
raw: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N> {
crate::algos::sqrt::sqrt_native::sqrt_native::<N, W>(
raw,
const { crate::int::types::Int::<W>::TEN.pow(SCALE) },
mode,
)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
#[allow(private_bounds)]
pub fn sqrt_newton_slice_n<const N: usize, const SCALE: u32>(
raw: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N>
where
crate::int::types::compute_limbs::Limbs<N>: crate::int::types::compute_limbs::ComputeLimbs,
{
crate::algos::sqrt::sqrt_newton::sqrt_newton::<N>(raw, SCALE, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn cbrt_native_w<const N: usize, const W: usize, const SCALE: u32>(
raw: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N> {
crate::algos::cbrt::cbrt_native::cbrt_native::<N, W>(
raw,
const { crate::int::types::Int::<W>::TEN.pow(2 * SCALE) },
mode,
)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn cbrt_native_fast_a_w<const N: usize, const W: usize, const SCALE: u32>(
raw: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N> {
crate::algos::cbrt::cbrt_native_fast::cbrt_native_fast_a::<N, W>(
raw,
const { crate::int::types::Int::<W>::TEN.pow(2 * SCALE) },
mode,
)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn cbrt_native_fast_b_w<const N: usize, const W: usize, const SCALE: u32>(
raw: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N> {
crate::algos::cbrt::cbrt_native_fast::cbrt_native_fast_b::<N, W>(
raw,
const { crate::int::types::Int::<W>::TEN.pow(2 * SCALE) },
mode,
)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
#[allow(private_bounds)]
pub fn cbrt_newton_slice_n<const N: usize, const SCALE: u32>(
raw: crate::int::types::Int<N>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<N>
where
crate::int::types::compute_limbs::Limbs<N>: crate::int::types::compute_limbs::ComputeLimbs,
{
crate::algos::cbrt::cbrt_newton::cbrt_newton::<N>(raw, SCALE, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn exp_series_d57<const SCALE: u32>(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d57::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d115", feature = "wide"))]
#[inline(never)]
pub fn exp_series_d115<const SCALE: u32>(
raw: crate::int::types::Int<6>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<6> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d115::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d153", feature = "wide"))]
#[inline(never)]
pub fn exp_series_d153<const SCALE: u32>(
raw: crate::int::types::Int<8>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<8> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d153::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d57", feature = "wide")))]
#[inline(never)]
pub fn exp_tang_d57<const SCALE: u32, const M: u32, const G: u32>(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d57::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d115", feature = "wide")))]
#[inline(never)]
pub fn exp_tang_d115<const SCALE: u32>(
raw: crate::int::types::Int<6>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<6> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d115::Core, SCALE, 128, 8, true, true, false>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d153", feature = "wide")))]
#[inline(never)]
pub fn exp_tang_d153<const SCALE: u32>(
raw: crate::int::types::Int<8>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<8> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d153::Core, SCALE, 128, 10, true, false, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d115", feature = "wide")))]
#[inline(never)]
pub fn exp_tang_d115_p<const SCALE: u32, const M: u32, const G: u32>(
raw: crate::int::types::Int<6>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<6> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d115::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d153", feature = "wide")))]
#[inline(never)]
pub fn exp_tang_d153_p<const SCALE: u32, const M: u32, const G: u32>(
raw: crate::int::types::Int<8>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<8> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d153::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(any(feature = "d76", feature = "wide"))]
#[inline(never)]
pub fn exp_series_d76<const SCALE: u32>(raw: crate::int::types::Int<4>, mode: crate::RoundingMode) -> crate::int::types::Int<4> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d76::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d76", feature = "wide")))]
#[inline(never)]
pub fn exp_tang_d76<const SCALE: u32, const M: u32, const G: u32>(raw: crate::int::types::Int<4>, mode: crate::RoundingMode) -> crate::int::types::Int<4> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d76::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(any(feature = "d230", feature = "wide"))]
#[inline(never)]
pub fn exp_series_d230<const SCALE: u32>(raw: crate::int::types::Int<12>, mode: crate::RoundingMode) -> crate::int::types::Int<12> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d230::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d230", feature = "wide")))]
#[inline(never)]
pub fn exp_tang_d230<const SCALE: u32, const M: u32, const G: u32>(raw: crate::int::types::Int<12>, mode: crate::RoundingMode) -> crate::int::types::Int<12> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d230::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn exp_series_d307<const SCALE: u32>(raw: crate::int::types::Int<16>, mode: crate::RoundingMode) -> crate::int::types::Int<16> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d307", feature = "wide", feature = "x-wide")))]
#[inline(never)]
pub fn exp_tang_d307<const SCALE: u32, const M: u32, const G: u32>(raw: crate::int::types::Int<16>, mode: crate::RoundingMode) -> crate::int::types::Int<16> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d307::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn exp_series_d462<const SCALE: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d462", feature = "x-wide")))]
#[inline(never)]
pub fn exp_tang_d462<const SCALE: u32, const M: u32, const G: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d462::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(any(feature = "d616", feature = "x-wide"))]
#[inline(never)]
pub fn exp_series_d616<const SCALE: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d616::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d616", feature = "x-wide")))]
#[inline(never)]
pub fn exp_tang_d616<const SCALE: u32, const M: u32, const G: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d616::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(any(feature = "d924", feature = "xx-wide"))]
#[inline(never)]
pub fn exp_series_d924<const SCALE: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d924::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d924", feature = "xx-wide")))]
#[inline(never)]
pub fn exp_tang_d924<const SCALE: u32, const M: u32, const G: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d924::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn exp_series_d1232<const SCALE: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::support::wide_trig_core::exp_series::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d1232", feature = "xx-wide")))]
#[inline(never)]
pub fn exp_tang_d1232<const SCALE: u32, const M: u32, const G: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::exp::exp_tang::exp_tang::<crate::types::widths::wide_trig_d1232::Core, SCALE, M, G, true, true, false>(raw, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn exp_schoolbook_d57<const SCALE: u32>(raw: crate::int::types::Int<3>, mode: crate::RoundingMode) -> crate::int::types::Int<3> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d57::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d76", feature = "wide"))]
#[inline(never)]
pub fn exp_schoolbook_d76<const SCALE: u32>(raw: crate::int::types::Int<4>, mode: crate::RoundingMode) -> crate::int::types::Int<4> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d76::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d115", feature = "wide"))]
#[inline(never)]
pub fn exp_schoolbook_d115<const SCALE: u32>(raw: crate::int::types::Int<6>, mode: crate::RoundingMode) -> crate::int::types::Int<6> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d115::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d153", feature = "wide"))]
#[inline(never)]
pub fn exp_schoolbook_d153<const SCALE: u32>(raw: crate::int::types::Int<8>, mode: crate::RoundingMode) -> crate::int::types::Int<8> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d153::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d230", feature = "wide"))]
#[inline(never)]
pub fn exp_schoolbook_d230<const SCALE: u32>(raw: crate::int::types::Int<12>, mode: crate::RoundingMode) -> crate::int::types::Int<12> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d230::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn exp_schoolbook_d307<const SCALE: u32>(raw: crate::int::types::Int<16>, mode: crate::RoundingMode) -> crate::int::types::Int<16> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn exp_schoolbook_d462<const SCALE: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d616", feature = "x-wide"))]
#[inline(never)]
pub fn exp_schoolbook_d616<const SCALE: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d616::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d924", feature = "xx-wide"))]
#[inline(never)]
pub fn exp_schoolbook_d924<const SCALE: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d924::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn exp_schoolbook_d1232<const SCALE: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::exp::exp_schoolbook::exp_schoolbook::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn sinh_schoolbook_d462<const SCALE: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::trig::hyper_schoolbook::sinh_schoolbook::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn cosh_schoolbook_d462<const SCALE: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::trig::hyper_schoolbook::cosh_schoolbook::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn tanh_schoolbook_d462<const SCALE: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::trig::hyper_schoolbook::tanh_schoolbook::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d462", feature = "x-wide")))]
#[inline(never)]
pub fn sinh_tang_compose_d462<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::trig::hyper_exp_identity::sinh_exp_identity_with_tang::<crate::types::widths::wide_trig_d462::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d462", feature = "x-wide")))]
#[inline(never)]
pub fn cosh_tang_compose_d462<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::trig::hyper_exp_identity::cosh_exp_identity_with_tang::<crate::types::widths::wide_trig_d462::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d462", feature = "x-wide")))]
#[inline(never)]
pub fn tanh_tang_compose_d462<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::trig::hyper_exp_identity::tanh_exp_identity_with_tang::<crate::types::widths::wide_trig_d462::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(any(feature = "d616", feature = "x-wide"))]
#[inline(never)]
pub fn sinh_schoolbook_d616<const SCALE: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::trig::hyper_schoolbook::sinh_schoolbook::<crate::types::widths::wide_trig_d616::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d616", feature = "x-wide"))]
#[inline(never)]
pub fn cosh_schoolbook_d616<const SCALE: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::trig::hyper_schoolbook::cosh_schoolbook::<crate::types::widths::wide_trig_d616::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d616", feature = "x-wide"))]
#[inline(never)]
pub fn tanh_schoolbook_d616<const SCALE: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::trig::hyper_schoolbook::tanh_schoolbook::<crate::types::widths::wide_trig_d616::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d616", feature = "x-wide")))]
#[inline(never)]
pub fn sinh_tang_compose_d616<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::trig::hyper_exp_identity::sinh_exp_identity_with_tang::<crate::types::widths::wide_trig_d616::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d616", feature = "x-wide")))]
#[inline(never)]
pub fn cosh_tang_compose_d616<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::trig::hyper_exp_identity::cosh_exp_identity_with_tang::<crate::types::widths::wide_trig_d616::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d616", feature = "x-wide")))]
#[inline(never)]
pub fn tanh_tang_compose_d616<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::trig::hyper_exp_identity::tanh_exp_identity_with_tang::<crate::types::widths::wide_trig_d616::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(any(feature = "d924", feature = "xx-wide"))]
#[inline(never)]
pub fn sinh_schoolbook_d924<const SCALE: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::trig::hyper_schoolbook::sinh_schoolbook::<crate::types::widths::wide_trig_d924::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d924", feature = "xx-wide"))]
#[inline(never)]
pub fn cosh_schoolbook_d924<const SCALE: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::trig::hyper_schoolbook::cosh_schoolbook::<crate::types::widths::wide_trig_d924::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d924", feature = "xx-wide"))]
#[inline(never)]
pub fn tanh_schoolbook_d924<const SCALE: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::trig::hyper_schoolbook::tanh_schoolbook::<crate::types::widths::wide_trig_d924::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d924", feature = "xx-wide")))]
#[inline(never)]
pub fn sinh_tang_compose_d924<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::trig::hyper_exp_identity::sinh_exp_identity_with_tang::<crate::types::widths::wide_trig_d924::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d924", feature = "xx-wide")))]
#[inline(never)]
pub fn cosh_tang_compose_d924<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::trig::hyper_exp_identity::cosh_exp_identity_with_tang::<crate::types::widths::wide_trig_d924::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d924", feature = "xx-wide")))]
#[inline(never)]
pub fn tanh_tang_compose_d924<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::trig::hyper_exp_identity::tanh_exp_identity_with_tang::<crate::types::widths::wide_trig_d924::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn sinh_schoolbook_d1232<const SCALE: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::trig::hyper_schoolbook::sinh_schoolbook::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn cosh_schoolbook_d1232<const SCALE: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::trig::hyper_schoolbook::cosh_schoolbook::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn tanh_schoolbook_d1232<const SCALE: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::trig::hyper_schoolbook::tanh_schoolbook::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d1232", feature = "xx-wide")))]
#[inline(never)]
pub fn sinh_tang_compose_d1232<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::trig::hyper_exp_identity::sinh_exp_identity_with_tang::<crate::types::widths::wide_trig_d1232::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d1232", feature = "xx-wide")))]
#[inline(never)]
pub fn cosh_tang_compose_d1232<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::trig::hyper_exp_identity::cosh_exp_identity_with_tang::<crate::types::widths::wide_trig_d1232::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d1232", feature = "xx-wide")))]
#[inline(never)]
pub fn tanh_tang_compose_d1232<const SCALE: u32, const M: u32, const GUARD: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::trig::hyper_exp_identity::tanh_exp_identity_with_tang::<crate::types::widths::wide_trig_d1232::Core, SCALE, GUARD, M, true>(raw, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn ln_series_d57<const SCALE: u32>(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d57::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d115", feature = "wide"))]
#[inline(never)]
pub fn ln_series_d115<const SCALE: u32>(
raw: crate::int::types::Int<6>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<6> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d115::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d153", feature = "wide"))]
#[inline(never)]
pub fn ln_series_d153<const SCALE: u32>(
raw: crate::int::types::Int<8>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<8> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d153::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d57", feature = "wide")))]
#[inline(never)]
pub fn ln_tang_d57<const SCALE: u32>(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d57::Core, SCALE, 8, 100, false, false>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d115", feature = "wide")))]
#[inline(never)]
pub fn ln_tang_d115<const SCALE: u32>(
raw: crate::int::types::Int<6>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<6> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d115::Core, SCALE, 8, 200, true, false>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d153", feature = "wide")))]
#[inline(never)]
pub fn ln_tang_d153<const SCALE: u32>(
raw: crate::int::types::Int<8>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<8> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d153::Core, SCALE, 10, 200, true, false>(raw, mode)
}
#[cfg(any(feature = "d76", feature = "wide"))]
#[inline(never)]
pub fn ln_series_d76<const SCALE: u32>(raw: crate::int::types::Int<4>, mode: crate::RoundingMode) -> crate::int::types::Int<4> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d76::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d76", feature = "wide")))]
#[inline(never)]
pub fn ln_tang_d76_p<const SCALE: u32, const G: u32, const CAP: u128>(raw: crate::int::types::Int<4>, mode: crate::RoundingMode) -> crate::int::types::Int<4> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d76::Core, SCALE, G, CAP, true, false>(raw, mode)
}
#[cfg(any(feature = "d230", feature = "wide"))]
#[inline(never)]
pub fn ln_series_d230<const SCALE: u32>(raw: crate::int::types::Int<12>, mode: crate::RoundingMode) -> crate::int::types::Int<12> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d230::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d230", feature = "wide")))]
#[inline(never)]
pub fn ln_tang_d230_p<const SCALE: u32, const G: u32, const CAP: u128>(raw: crate::int::types::Int<12>, mode: crate::RoundingMode) -> crate::int::types::Int<12> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d230::Core, SCALE, G, CAP, true, false>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn ln_series_d307<const SCALE: u32>(raw: crate::int::types::Int<16>, mode: crate::RoundingMode) -> crate::int::types::Int<16> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d307", feature = "wide", feature = "x-wide")))]
#[inline(never)]
pub fn ln_tang_d307_p<const SCALE: u32, const G: u32, const CAP: u128>(raw: crate::int::types::Int<16>, mode: crate::RoundingMode) -> crate::int::types::Int<16> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d307::Core, SCALE, G, CAP, true, false>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn ln_series_d462<const SCALE: u32>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d462", feature = "x-wide")))]
#[inline(never)]
pub fn ln_tang_d462_p<const SCALE: u32, const G: u32, const CAP: u128>(raw: crate::int::types::Int<24>, mode: crate::RoundingMode) -> crate::int::types::Int<24> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d462::Core, SCALE, G, CAP, true, false>(raw, mode)
}
#[cfg(any(feature = "d616", feature = "x-wide"))]
#[inline(never)]
pub fn ln_series_d616<const SCALE: u32>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d616::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d616", feature = "x-wide")))]
#[inline(never)]
pub fn ln_tang_d616_p<const SCALE: u32, const G: u32, const CAP: u128>(raw: crate::int::types::Int<32>, mode: crate::RoundingMode) -> crate::int::types::Int<32> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d616::Core, SCALE, G, CAP, true, false>(raw, mode)
}
#[cfg(any(feature = "d924", feature = "xx-wide"))]
#[inline(never)]
pub fn ln_series_d924<const SCALE: u32>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d924::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d924", feature = "xx-wide")))]
#[inline(never)]
pub fn ln_tang_d924_p<const SCALE: u32, const G: u32, const CAP: u128>(raw: crate::int::types::Int<48>, mode: crate::RoundingMode) -> crate::int::types::Int<48> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d924::Core, SCALE, G, CAP, true, false>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn ln_series_d1232<const SCALE: u32>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::support::wide_trig_core::ln_series::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d1232", feature = "xx-wide")))]
#[inline(never)]
pub fn ln_tang_d1232_p<const SCALE: u32, const G: u32, const CAP: u128>(raw: crate::int::types::Int<64>, mode: crate::RoundingMode) -> crate::int::types::Int<64> {
crate::algos::ln::ln_tang::ln_tang::<crate::types::widths::wide_trig_d1232::Core, SCALE, G, CAP, true, false>(raw, mode)
}
#[cfg(any(feature = "d57", feature = "wide"))]
#[inline(never)]
pub fn sin_series_d57<const SCALE: u32>(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::support::wide_trig_core::sin_series::<crate::types::widths::wide_trig_d57::Core, SCALE>(raw, mode)
}
#[cfg(all(feature = "_wide-support", any(feature = "d57", feature = "wide")))]
#[inline(never)]
pub fn sin_tang_d57<const SCALE: u32>(
raw: crate::int::types::Int<3>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<3> {
crate::algos::trig::sincos_tang::sin_tang_with_taylor::<crate::types::widths::wide_trig_d57::Core, SCALE, 512>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn sin_series_d462<const SCALE: u32>(
raw: crate::int::types::Int<24>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<24> {
crate::algos::support::wide_trig_core::sin_series::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn sin_narrow_d462<const SCALE: u32, const GUARD: u32>(
raw: crate::int::types::Int<24>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<24> {
crate::algos::trig::sincos_narrow::sin_narrow_with_taylor::<crate::types::widths::wide_trig_d462::Core, SCALE, GUARD>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn cos_series_d462<const SCALE: u32>(
raw: crate::int::types::Int<24>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<24> {
crate::algos::support::wide_trig_core::cos_series::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn cos_narrow_d462<const SCALE: u32, const GUARD: u32>(
raw: crate::int::types::Int<24>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<24> {
crate::algos::trig::sincos_narrow::cos_narrow_with_taylor::<crate::types::widths::wide_trig_d462::Core, SCALE, GUARD>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn tan_series_d462<const SCALE: u32>(
raw: crate::int::types::Int<24>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<24> {
crate::algos::support::wide_trig_core::tan_series::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn tan_narrow_d462<const SCALE: u32, const GUARD: u32>(
raw: crate::int::types::Int<24>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<24> {
crate::algos::trig::sincos_narrow::tan_narrow_with_taylor::<crate::types::widths::wide_trig_d462::Core, SCALE, GUARD, false>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn atan_series_d462<const SCALE: u32>(
raw: crate::int::types::Int<24>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<24> {
crate::algos::support::wide_trig_core::atan_series::<crate::types::widths::wide_trig_d462::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d462", feature = "x-wide"))]
#[inline(never)]
pub fn atan_narrow_d462<const SCALE: u32, const GUARD: u32>(
raw: crate::int::types::Int<24>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<24> {
crate::algos::support::wide_trig_core::atan_narrow::<crate::types::widths::wide_trig_d462::Core, SCALE, GUARD>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn sin_series_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::algos::support::wide_trig_core::sin_series::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn sin_rung_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::policy::trig::forward_rung::sin_strict::<crate::types::widths::wide_trig_d307::Core, SCALE, { <crate::types::widths::wide_trig_d307::Core as crate::algos::support::wide_trig_core::WideTrigCore>::GUARD }>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn cos_series_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::algos::support::wide_trig_core::cos_series::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn cos_rung_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::policy::trig::forward_rung::cos_strict::<crate::types::widths::wide_trig_d307::Core, SCALE, { <crate::types::widths::wide_trig_d307::Core as crate::algos::support::wide_trig_core::WideTrigCore>::GUARD }>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn tan_series_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::algos::support::wide_trig_core::tan_series::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn tan_rung_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::policy::trig::forward_rung::tan_strict::<crate::types::widths::wide_trig_d307::Core, SCALE, { <crate::types::widths::wide_trig_d307::Core as crate::algos::support::wide_trig_core::WideTrigCore>::GUARD }, true, true>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn sin_series_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::algos::support::wide_trig_core::sin_series::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn sin_rung_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::policy::trig::forward_rung::sin_strict::<crate::types::widths::wide_trig_d1232::Core, SCALE, { <crate::types::widths::wide_trig_d1232::Core as crate::algos::support::wide_trig_core::WideTrigCore>::GUARD }>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn cos_series_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::algos::support::wide_trig_core::cos_series::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn cos_rung_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::policy::trig::forward_rung::cos_strict::<crate::types::widths::wide_trig_d1232::Core, SCALE, { <crate::types::widths::wide_trig_d1232::Core as crate::algos::support::wide_trig_core::WideTrigCore>::GUARD }>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn tan_series_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::algos::support::wide_trig_core::tan_series::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn tan_rung_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::policy::trig::forward_rung::tan_strict::<crate::types::widths::wide_trig_d1232::Core, SCALE, { <crate::types::widths::wide_trig_d1232::Core as crate::algos::support::wide_trig_core::WideTrigCore>::GUARD }, true, true>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn atan_series_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::algos::support::wide_trig_core::atan_series::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn atan_rung_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::policy::trig::forward_rung::atan_strict::<crate::types::widths::wide_trig_d307::Core, SCALE, { <crate::types::widths::wide_trig_d307::Core as crate::algos::support::wide_trig_core::WideTrigCore>::GUARD }, true>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn asin_schoolbook_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::algos::trig::inverse_schoolbook::asin_schoolbook::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn asin_rung_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::policy::trig::inverse_rung::asin_strict::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn sinh_schoolbook_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::algos::trig::hyper_schoolbook::sinh_schoolbook::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn sinh_rung_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::policy::trig::hyper_rung::sinh_strict::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn exp_rung_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::policy::exp::series_at_rung::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn asinh_schoolbook_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::algos::trig::hyper_schoolbook::asinh_schoolbook::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d307", feature = "wide", feature = "x-wide"))]
#[inline(never)]
pub fn asinh_rung_d307<const SCALE: u32>(
raw: crate::int::types::Int<16>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<16> {
crate::policy::trig::extra_rung::asinh_strict::<crate::types::widths::wide_trig_d307::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn atan_series_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::algos::support::wide_trig_core::atan_series::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn atan_rung_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::policy::trig::forward_rung::atan_strict::<crate::types::widths::wide_trig_d1232::Core, SCALE, { <crate::types::widths::wide_trig_d1232::Core as crate::algos::support::wide_trig_core::WideTrigCore>::GUARD }, true>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn asin_schoolbook_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::algos::trig::inverse_schoolbook::asin_schoolbook::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn asin_rung_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::policy::trig::inverse_rung::asin_strict::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn sinh_rung_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::policy::trig::hyper_rung::sinh_strict::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn exp_rung_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::policy::exp::series_at_rung::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn asinh_schoolbook_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::algos::trig::hyper_schoolbook::asinh_schoolbook::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
#[inline(never)]
pub fn asinh_rung_d1232<const SCALE: u32>(
raw: crate::int::types::Int<64>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<64> {
crate::policy::trig::extra_rung::asinh_strict::<crate::types::widths::wide_trig_d1232::Core, SCALE>(raw, mode)
}
macro_rules! to_radians_bench {
($direct:ident, $public:ident, $n:literal, $core:ident, $feat:literal) => {
#[cfg(any(feature = $feat, feature = "wide"))]
#[inline(never)]
pub fn $direct<const SCALE: u32>(
raw: crate::int::types::Int<$n>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<$n> {
crate::algos::trig::angle_mul_pi_ratio::to_radians_mul_pi_ratio::<
crate::types::widths::$core::Core,
SCALE,
>(raw, mode)
}
#[cfg(any(feature = $feat, feature = "wide"))]
#[inline(never)]
pub fn $public<const SCALE: u32>(
raw: crate::int::types::Int<$n>,
mode: crate::RoundingMode,
) -> crate::int::types::Int<$n> {
crate::D::<crate::int::types::Int<$n>, SCALE>(raw)
.to_radians_strict_with(mode)
.0
}
};
}
to_radians_bench!(to_radians_direct_d57, to_radians_public_d57, 3, wide_trig_d57, "d57");
to_radians_bench!(to_radians_direct_d76, to_radians_public_d76, 4, wide_trig_d76, "d76");
to_radians_bench!(to_radians_direct_d115, to_radians_public_d115, 6, wide_trig_d115, "d115");
to_radians_bench!(to_radians_direct_d153, to_radians_public_d153, 8, wide_trig_d153, "d153");
#[inline(never)]
pub fn int_from_mag_limbs<const N: usize>(mag: &[u64; N]) -> crate::int::types::Int<N> {
crate::int::types::Int::<N>::from_mag_limbs(mag, false)
}
#[inline(never)]
pub fn mul_u64_into<const L: usize, const LP1: usize>(
a: &[u64; L],
n: u64,
out: &mut [u64; LP1],
) {
crate::int::algos::mul::mul_schoolbook::mul_schoolbook_into::<L, LP1>(a, n, out)
}
#[inline(never)]
#[allow(private_bounds)]
pub fn round_div_pow10_slow<W: crate::int::types::traits::BigInt>(n: W, w: u32) -> W {
let d: W = W::TEN.pow(w);
let zero = W::ZERO;
let one = W::ONE;
let (q, r) = n.div_rem(d);
if r == zero {
return q;
}
let ar = if r < zero { zero - r } else { r };
let ad = if d < zero { zero - d } else { d };
let comp = ad - ar;
let cmp_r = ar.cmp(&comp);
let q_is_odd = q.bit(0);
let result_positive = (n < zero) == (d < zero);
if crate::support::rounding::should_bump(
crate::support::rounding::RoundingMode::HalfToEven,
cmp_r,
q_is_odd,
result_positive,
) {
if result_positive { q + one } else { q - one }
} else {
q
}
}
#[inline(never)]
#[allow(private_bounds)]
pub fn round_div_pow10_fast<W>(n: W, w: u32) -> W
where
W: crate::int::types::traits::BigInt,
W::Scratch: crate::int::types::compute_limbs::ComputeLimbs,
{
if w == 0 {
return n;
}
if w <= 38 {
return crate::algos::support::mg_divide::div_wide_pow10::<W>(
n,
w,
crate::support::rounding::RoundingMode::HalfToEven,
);
}
crate::algos::support::rescale::dispatch_wide_pow10::<W>(
n,
w,
crate::support::rounding::RoundingMode::HalfToEven,
)
}
#[cfg(any(feature = "x-wide", feature = "xx-wide"))]
pub mod newton_vs_mg {
use crate::algos::support::newton_reciprocal::NewtonReciprocal as NR;
pub struct NewtonReciprocal(pub(crate) NR);
impl NewtonReciprocal {
#[inline(never)]
pub fn precompute(scale: u32, width_limbs: usize) -> Self {
Self(NR::precompute(scale, width_limbs))
}
}
macro_rules! shim {
($pub_name:ident, $width:ty, $feat:literal) => {
#[cfg(any(feature = $feat))]
pub mod $pub_name {
use super::NewtonReciprocal;
use crate::RoundingMode;
type W = $width;
#[derive(Clone, Copy)]
pub struct Storage(W);
#[inline(never)]
pub fn build_numerator(top_limb_idx: usize) -> Storage {
use crate::int::types::traits::BigInt;
let mut mag = [0u128; 256];
mag[top_limb_idx] = 1u128 << 32;
mag[1] = 0xdeadbeef_cafef00d_u128;
Storage(W::from_mag_sign_u128(&mag, false))
}
#[inline(never)]
pub fn mg_chain(n: Storage, scale: u32) -> Storage {
Storage(crate::algos::support::mg_divide::div_wide_pow10_chain::<W>(
n.0,
scale,
RoundingMode::HalfToEven,
))
}
#[inline(never)]
pub fn mg_single(n: Storage, scale: u32) -> Storage {
Storage(crate::algos::support::mg_divide::div_wide_pow10::<W>(
n.0,
scale,
RoundingMode::HalfToEven,
))
}
#[inline(never)]
pub fn newton(n: Storage, scale: u32, table: &NewtonReciprocal) -> Storage {
Storage(
crate::algos::support::newton_reciprocal::div_wide_pow10_newton_with::<W>(
n.0,
scale,
RoundingMode::HalfToEven,
&table.0,
),
)
}
#[inline(never)]
pub fn newton_u128(n: Storage, scale: u32, table: &NewtonReciprocal) -> Storage {
use crate::int::types::traits::BigInt;
let mut mag_u128 = [0u128; 256];
let mag = &mut mag_u128[..W::U128_LIMBS];
let neg = n.0.mag_into_u128(mag);
crate::algos::support::newton_reciprocal::newton_pow10_mag_u128_packed(
mag,
neg,
RoundingMode::HalfToEven,
&table.0,
);
Storage(W::from_mag_sign_u128(mag, neg))
}
}
};
}
shim!(d307, crate::int::types::Int<16>, "x-wide");
shim!(d462, crate::int::types::Int<24>, "x-wide");
shim!(d616, crate::int::types::Int<32>, "x-wide");
shim!(d924, crate::int::types::Int<48>, "xx-wide");
shim!(d1232, crate::int::types::Int<64>, "xx-wide");
shim!(b6144, crate::int::types::Int<96>, "xx-wide");
}
#[inline(never)]
pub fn neg_fused_split<const N: usize>(
a: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
crate::int::algos::neg::neg_twos_complement::neg_twos_complement::<N>(a)
}
#[inline(never)]
pub fn neg_two_pass<const N: usize>(a: crate::int::types::Int<N>) -> crate::int::types::Int<N> {
let limbs_in = a.as_limbs();
let mut out = [0u64; N];
let mut i = 0;
while i < N {
out[i] = !limbs_in[i];
i += 1;
}
let mut one = [0u64; N];
if N > 0 {
one[0] = 1;
}
let mut carry: u64 = 0;
let mut i = 0;
while i < N {
let (s1, c1) = out[i].overflowing_add(one[i]);
let (s2, c2) = s1.overflowing_add(carry);
out[i] = s2;
carry = (c1 as u64) + (c2 as u64);
i += 1;
}
let _ = carry;
crate::int::types::Int::<N>::from_limbs(out)
}
#[inline(never)]
pub fn neg_fused_open<const N: usize>(
a: crate::int::types::Int<N>,
) -> crate::int::types::Int<N> {
let mut out = [0u64; N];
let limbs = a.as_limbs();
let mut carry: u64 = 1;
let mut i = 0;
while i < N {
let (s, c) = (!limbs[i]).overflowing_add(carry);
out[i] = s;
carry = c as u64;
i += 1;
}
let _ = carry;
crate::int::types::Int::<N>::from_limbs(out)
}
}
mod macros;
#[cfg(feature = "cross-scale-ops")]
pub mod cross_scale;
#[cfg(feature = "cross-scale-ops")]
pub use crate::cross_scale as cross;
mod int;
mod policy;
#[cfg(feature = "serde")]
pub use crate::support::serde_helpers;
pub use crate::support::error::{ConvertError, ParseError};
pub use crate::support::rounding::RoundingMode;
pub use crate::types::traits::DecimalConstants;
pub use crate::types::traits::Decimal;
pub use crate::types::traits::DecimalArithmetic;
pub use crate::types::traits::DecimalConvert;
pub use crate::types::traits::DecimalTranscendental;
pub use crate::types::traits::WidthLE;
pub use crate::types::unified::D;
#[cfg(feature = "dyn")]
pub use crate::types::traits::dyn_decimal::{DecimalWidth, DynDecimal, RawStorage};
pub use crate::types::widths::{
D38, D38s0, D38s1, D38s2, D38s3, D38s4, D38s5, D38s6, D38s7, D38s8, D38s9, D38s10, D38s11,
D38s12, D38s13, D38s14, D38s15, D38s16, D38s17, D38s18, D38s19, D38s20, D38s21, D38s22, D38s23,
D38s24, D38s25, D38s26, D38s27, D38s28, D38s29, D38s30, D38s31, D38s32, D38s33, D38s34, D38s35,
D38s36, D38s37,
};
pub use crate::types::widths::{
D18, D18s0, D18s1, D18s2, D18s3, D18s4, D18s5, D18s6, D18s7, D18s8, D18s9, D18s10, D18s11,
D18s12, D18s13, D18s14, D18s15, D18s16, D18s17,
};
pub use crate::int::types::{Int, Uint};
#[cfg(any(feature = "d76", feature = "wide"))]
pub use crate::types::widths::{
D76, D76s0, D76s1, D76s2, D76s3, D76s4, D76s6, D76s9, D76s12, D76s15, D76s18, D76s20, D76s24,
D76s28, D76s32, D76s35, D76s38, D76s42, D76s48, D76s50, D76s56, D76s64, D76s70, D76s75,
};
#[cfg(any(feature = "d153", feature = "wide"))]
pub use crate::types::widths::{
D153, D153s0, D153s1, D153s2, D153s4, D153s6, D153s9, D153s12, D153s15, D153s18, D153s20,
D153s24, D153s28, D153s32, D153s35, D153s38, D153s50, D153s57, D153s75, D153s76, D153s100,
D153s115, D153s140, D153s150, D153s152,
};
#[cfg(any(feature = "d307", feature = "wide"))]
pub use crate::types::widths::{
D307, D307s0, D307s1, D307s2, D307s4, D307s6, D307s9, D307s12, D307s15, D307s18, D307s20,
D307s24, D307s28, D307s32, D307s35, D307s38, D307s50, D307s75, D307s100, D307s115, D307s150,
D307s153, D307s200, D307s230, D307s275, D307s300, D307s306,
};
#[cfg(any(feature = "d57", feature = "wide"))]
pub use crate::types::widths::{
D57, D57s0, D57s1, D57s2, D57s4, D57s6, D57s9, D57s12, D57s18, D57s20, D57s24, D57s28, D57s32,
D57s38, D57s42, D57s48, D57s52, D57s56,
};
#[cfg(any(feature = "d115", feature = "wide"))]
pub use crate::types::widths::{
D115, D115s0, D115s1, D115s4, D115s8, D115s16, D115s24, D115s32, D115s38, D115s50, D115s57,
D115s64, D115s76, D115s90, D115s100, D115s110, D115s114,
};
#[cfg(any(feature = "d230", feature = "wide"))]
pub use crate::types::widths::{
D230, D230s0, D230s1, D230s6, D230s18, D230s38, D230s57, D230s75, D230s100, D230s115, D230s140,
D230s153, D230s175, D230s200, D230s215, D230s225, D230s229,
};
#[cfg(any(feature = "d462", feature = "x-wide"))]
pub use crate::types::widths::{
D462, D462s0, D462s1, D462s18, D462s38, D462s75, D462s115, D462s153, D462s200, D462s230,
D462s275, D462s307, D462s350, D462s400, D462s440, D462s460, D462s461,
};
#[cfg(any(feature = "d616", feature = "x-wide"))]
pub use crate::types::widths::{
D616, D616s0, D616s1, D616s38, D616s75, D616s115, D616s153, D616s200, D616s230, D616s275,
D616s308, D616s380, D616s462, D616s500, D616s555, D616s600, D616s615,
};
#[cfg(any(feature = "d924", feature = "xx-wide"))]
pub use crate::types::widths::{
D924, D924s0, D924s1, D924s75, D924s153, D924s230, D924s307, D924s400, D924s461, D924s462,
D924s500, D924s616, D924s700, D924s800, D924s860, D924s900, D924s920, D924s923,
};
#[cfg(any(feature = "d1232", feature = "xx-wide"))]
pub use crate::types::widths::{
D1232, D1232s0, D1232s1, D1232s75, D1232s153, D1232s230, D1232s307, D1232s461, D1232s616,
D1232s700, D1232s800, D1232s900, D1232s924, D1232s1000, D1232s1100, D1232s1180, D1232s1220,
D1232s1230, D1232s1231,
};
#[cfg(feature = "macros")]
pub use decimal_scaled_macros::{d18, d38};
#[cfg(all(feature = "macros", any(feature = "d76", feature = "wide")))]
pub use decimal_scaled_macros::d76;
#[cfg(all(feature = "macros", any(feature = "d153", feature = "wide")))]
pub use decimal_scaled_macros::d153;
#[cfg(all(
feature = "macros",
any(feature = "d307", feature = "wide", feature = "x-wide")
))]
pub use decimal_scaled_macros::d307;
#[cfg(all(feature = "macros", any(feature = "d57", feature = "wide")))]
pub use decimal_scaled_macros::d57;
#[cfg(all(feature = "macros", any(feature = "d115", feature = "wide")))]
pub use decimal_scaled_macros::d115;
#[cfg(all(feature = "macros", any(feature = "d230", feature = "wide")))]
pub use decimal_scaled_macros::d230;
#[cfg(all(feature = "macros", any(feature = "d462", feature = "x-wide")))]
pub use decimal_scaled_macros::d462;
#[cfg(all(feature = "macros", any(feature = "d616", feature = "x-wide")))]
pub use decimal_scaled_macros::d616;
#[cfg(all(feature = "macros", any(feature = "d924", feature = "xx-wide")))]
pub use decimal_scaled_macros::d924;
#[cfg(all(feature = "macros", any(feature = "d1232", feature = "xx-wide")))]
pub use decimal_scaled_macros::d1232;
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d18s0 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d18!($v, scale 0 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d18s2 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d18!($v, scale 2 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d18s4 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d18!($v, scale 4 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d18s6 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d18!($v, scale 6 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d18s9 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d18!($v, scale 9 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d18s12 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d18!($v, scale 12 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s0 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 0 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s2 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 2 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s4 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 4 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s6 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 6 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s8 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 8 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s9 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 9 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s12 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 12 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s15 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 15 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s18 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 18 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s24 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 24 $(, $($rest)*)?) }; }
#[cfg(feature = "macros")]
#[macro_export]
macro_rules! d38s35 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d38!($v, scale 35 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d76", feature = "wide")))]
#[macro_export]
macro_rules! d76s0 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d76!($v, scale 0 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d76", feature = "wide")))]
#[macro_export]
macro_rules! d76s2 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d76!($v, scale 2 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d76", feature = "wide")))]
#[macro_export]
macro_rules! d76s6 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d76!($v, scale 6 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d76", feature = "wide")))]
#[macro_export]
macro_rules! d76s12 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d76!($v, scale 12 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d76", feature = "wide")))]
#[macro_export]
macro_rules! d76s18 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d76!($v, scale 18 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d76", feature = "wide")))]
#[macro_export]
macro_rules! d76s35 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d76!($v, scale 35 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d76", feature = "wide")))]
#[macro_export]
macro_rules! d76s50 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d76!($v, scale 50 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d153", feature = "wide")))]
#[macro_export]
macro_rules! d153s0 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d153!($v, scale 0 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d153", feature = "wide")))]
#[macro_export]
macro_rules! d153s35 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d153!($v, scale 35 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d153", feature = "wide")))]
#[macro_export]
macro_rules! d153s75 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d153!($v, scale 75 $(, $($rest)*)?) }; }
#[cfg(all(feature = "macros", any(feature = "d153", feature = "wide")))]
#[macro_export]
macro_rules! d153s150 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d153!($v, scale 150 $(, $($rest)*)?) }; }
#[cfg(all(
feature = "macros",
any(feature = "d307", feature = "wide", feature = "x-wide")
))]
#[macro_export]
macro_rules! d307s0 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d307!($v, scale 0 $(, $($rest)*)?) }; }
#[cfg(all(
feature = "macros",
any(feature = "d307", feature = "wide", feature = "x-wide")
))]
#[macro_export]
macro_rules! d307s35 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d307!($v, scale 35 $(, $($rest)*)?) }; }
#[cfg(all(
feature = "macros",
any(feature = "d307", feature = "wide", feature = "x-wide")
))]
#[macro_export]
macro_rules! d307s150 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d307!($v, scale 150 $(, $($rest)*)?) }; }
#[cfg(all(
feature = "macros",
any(feature = "d307", feature = "wide", feature = "x-wide")
))]
#[macro_export]
macro_rules! d307s300 { ($v:tt $(, $($rest:tt)*)?) => { $crate::d307!($v, scale 300 $(, $($rest)*)?) }; }