Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Functions | Variables
uni20::math Namespace Reference

Shared scalar math with native overloads and class-specific ADL customization. More...

Functions

template<class T >
requires requires(T const& value) { math::abs(value) * math::abs(value); }
auto abs_squared (T const &value)
 Square the magnitude, evaluating the scalar absolute value once.
 

Variables

constexpr detail::scalar_math::abs_fn abs {}
 Absolute value or complex magnitude, preserving the selected scalar implementation.
 
constexpr detail::scalar_math::acos_fn acos {}
 Inverse cosine in radians.
 
constexpr detail::scalar_math::acosh_fn acosh {}
 Inverse hyperbolic cosine.
 
constexpr detail::scalar_math::acospi_fn acospi {}
 Principal arccosine divided by pi.
 
constexpr detail::scalar_math::agm_fn agm {}
 Nonnegative arithmetic-geometric mean.
 
constexpr detail::scalar_math::airy_ai_fn airy_ai {}
 Real Airy Ai; native inputs retain their precision and full negative-axis phase.
 
constexpr detail::scalar_math::asin_fn asin {}
 Inverse sine in radians.
 
constexpr detail::scalar_math::asinh_fn asinh {}
 Inverse hyperbolic sine.
 
constexpr detail::scalar_math::asinpi_fn asinpi {}
 Principal arcsine divided by pi.
 
constexpr detail::scalar_math::atan_fn atan {}
 Inverse tangent in radians.
 
constexpr detail::scalar_math::atan2_fn atan2 {}
 Quadrant-aware inverse tangent of y/x in radians.
 
constexpr detail::scalar_math::atan2pi_fn atan2pi {}
 Quadrant-aware arctangent divided by pi.
 
constexpr detail::scalar_math::atanh_fn atanh {}
 Inverse hyperbolic tangent.
 
constexpr detail::scalar_math::atanpi_fn atanpi {}
 Principal arctangent divided by pi.
 
constexpr detail::scalar_math::bessel_j_fn bessel_j {}
 Integer-order Bessel function of the first kind, with order first.
 
constexpr detail::scalar_math::bessel_y_fn bessel_y {}
 Integer-order Bessel function of the second kind, with order first.
 
constexpr detail::scalar_math::beta_fn beta {}
 Real Beta function.
 
constexpr detail::scalar_math::cbrt_fn cbrt {}
 Real cube root, including negative arguments.
 
constexpr detail::scalar_math::ceil_fn ceil {}
 Least integral value not less than the argument, in the scalar's result type.
 
constexpr detail::scalar_math::compound_fn compound {}
 Integer power of one plus x, retaining the original increment.
 
constexpr detail::scalar_math::conj_fn conj {}
 Complex conjugation; real and integral values retain their type.
 
constexpr detail::scalar_math::copysign_fn copysign {}
 Copy the sign while retaining the magnitude operand type and precision.
 
constexpr detail::scalar_math::cos_fn cos {}
 Cosine with scalar-specific precision handling.
 
constexpr detail::scalar_math::cosh_fn cosh {}
 Hyperbolic cosine.
 
constexpr detail::scalar_math::cospi_fn cospi {}
 Cosine of pi times x, with argument reduction before multiplication by pi.
 
constexpr detail::scalar_math::cot_fn cot {}
 Reciprocal tangent, retaining the input type and precision.
 
constexpr detail::scalar_math::coth_fn coth {}
 Reciprocal hyperbolic tangent, retaining the input type and precision.
 
constexpr detail::scalar_math::csc_fn csc {}
 Reciprocal sine, retaining the input type and precision.
 
constexpr detail::scalar_math::csch_fn csch {}
 Reciprocal hyperbolic sine, retaining the input type and precision.
 
constexpr detail::scalar_math::digamma_fn digamma {}
 Logarithmic derivative of Gamma.
 
constexpr detail::scalar_math::dilog_real_fn dilog_real {}
 Real part of the dilogarithm.
 
constexpr detail::scalar_math::erf_fn erf {}
 Real error function.
 
constexpr detail::scalar_math::erfc_fn erfc {}
 Complementary error function without subtractive cancellation.
 
constexpr detail::scalar_math::exp_fn exp {}
 Natural exponential with scalar-specific precision handling.
 
constexpr detail::scalar_math::exp10_fn exp10 {}
 Base-ten exponential.
 
constexpr detail::scalar_math::exp10m1_fn exp10m1 {}
 Ten to the power x minus one, using the cancellation-safe provider.
 
constexpr detail::scalar_math::exp2_fn exp2 {}
 Base-two exponential.
 
constexpr detail::scalar_math::exp2m1_fn exp2m1 {}
 Two to the power x minus one, using the cancellation-safe provider.
 
constexpr detail::scalar_math::expint_fn expint {}
 Real principal-value exponential integral Ei.
 
constexpr detail::scalar_math::expm1_fn expm1 {}
 Natural exponential minus one, evaluated without subtractive cancellation.
 
constexpr detail::scalar_math::factorial_fn factorial {}
 MPFR factorial at an explicit arithmetic state; use uni20::factorial<Real> for a typed result.
 
constexpr detail::scalar_math::fdim_fn fdim {}
 Positive difference, preserving NaN propagation.
 
constexpr detail::scalar_math::floor_fn floor {}
 Round toward negative infinity.
 
constexpr detail::scalar_math::fma_fn fma {}
 Fused multiplication and addition with one final rounding.
 
constexpr detail::scalar_math::fmax_fn fmax {}
 Maximum, preferring the numeric operand over a NaN.
 
constexpr detail::scalar_math::fmin_fn fmin {}
 Minimum, preferring the numeric operand over a NaN.
 
constexpr detail::scalar_math::fmod_fn fmod {}
 Remainder using a quotient truncated toward zero.
 
constexpr detail::scalar_math::frexp_fn frexp {}
 Binary fraction and exponent as an owning result.
 
constexpr detail::scalar_math::hypot_fn hypot {}
 Euclidean length with scalar-specific overflow and underflow handling.
 
constexpr detail::scalar_math::ilogb_fn ilogb {}
 Binary exponent of a finite nonzero value; throws otherwise.
 
constexpr detail::scalar_math::imag_fn imag {}
 Read the imaginary component by value; real zero retains the input's type and precision.
 
constexpr detail::scalar_math::isfinite_fn isfinite {}
 Whether a real scalar is finite.
 
constexpr detail::scalar_math::isinf_fn isinf {}
 Whether a real scalar is infinite.
 
constexpr detail::scalar_math::isnan_fn isnan {}
 Whether a real scalar is NaN.
 
constexpr detail::scalar_math::ldexp_fn ldexp {}
 Multiply by a power of two using the scalar's exponent interface.
 
constexpr detail::scalar_math::lgamma_fn lgamma {}
 Logarithm of the absolute Gamma function; native providers are reentrant.
 
constexpr detail::scalar_math::lgamma_sign_fn lgamma_sign {}
 Log-absolute-Gamma and its sign as owning values.
 
constexpr detail::scalar_math::log_fn log {}
 Natural logarithm with scalar-specific precision handling.
 
constexpr detail::scalar_math::log10_fn log10 {}
 Base-ten logarithm.
 
constexpr detail::scalar_math::log10p1_fn log10p1 {}
 Base-ten logarithm of one plus x, without rounding the sum first.
 
constexpr detail::scalar_math::log1p_fn log1p {}
 Natural logarithm of one plus the argument, retaining small increments.
 
constexpr detail::scalar_math::log2_fn log2 {}
 Base-two logarithm where supplied by the scalar implementation.
 
constexpr detail::scalar_math::log2p1_fn log2p1 {}
 Base-two logarithm of one plus x, without rounding the sum first.
 
constexpr detail::scalar_math::modf_fn modf {}
 Signed fractional and integral parts as an owning result.
 
constexpr detail::scalar_math::next_down_fn next_down {}
 Adjacent value toward negative infinity.
 
constexpr detail::scalar_math::next_up_fn next_up {}
 Adjacent value toward positive infinity.
 
constexpr detail::scalar_math::nextafter_fn nextafter {}
 Adjacent value on the first operand grid toward the direction operand.
 
constexpr detail::scalar_math::pow_fn pow {}
 Power with the selected scalar's domain, exactness and precision rules.
 
constexpr detail::scalar_math::pown_fn pown {}
 Integer power with scalar-specific rounding.
 
constexpr detail::scalar_math::real_fn real {}
 Read the real component by value; real and integral scalars retain their type.
 
constexpr detail::scalar_math::remainder_fn remainder {}
 Remainder using the nearest-even integer quotient.
 
constexpr detail::scalar_math::remquo_fn remquo {}
 Nearest-even remainder and signed low three quotient bits.
 
constexpr detail::scalar_math::rootn_fn rootn {}
 Real integer-order root; negative orders give reciprocal roots.
 
constexpr detail::scalar_math::round_fn round {}
 Round to nearest integer with ties away from zero.
 
constexpr detail::scalar_math::round_even_fn round_even {}
 Nearest integer with ties to even.
 
constexpr detail::scalar_math::scalbn_fn scalbn {}
 Binary scaling with a signed 64-bit exponent.
 
constexpr detail::scalar_math::sec_fn sec {}
 Reciprocal cosine, retaining the input type and precision.
 
constexpr detail::scalar_math::sech_fn sech {}
 Reciprocal hyperbolic cosine, retaining the input type and precision.
 
constexpr detail::scalar_math::signbit_fn signbit {}
 Inspect the sign, including approximate negative zero.
 
constexpr detail::scalar_math::sin_fn sin {}
 Sine with scalar-specific precision handling.
 
constexpr detail::scalar_math::sincos_fn sincos {}
 Sine and cosine at one input.
 
constexpr detail::scalar_math::sinh_fn sinh {}
 Hyperbolic sine.
 
constexpr detail::scalar_math::sinhcosh_fn sinhcosh {}
 Hyperbolic sine and cosine at one input.
 
constexpr detail::scalar_math::sinpi_fn sinpi {}
 Sine of pi times x, with argument reduction before multiplication by pi.
 
constexpr detail::scalar_math::sqrt_fn sqrt {}
 Square root; exact inputs requiring approximation need an explicit finite precision.
 
constexpr detail::scalar_math::tan_fn tan {}
 Tangent in radians.
 
constexpr detail::scalar_math::tanh_fn tanh {}
 Hyperbolic tangent.
 
constexpr detail::scalar_math::tanpi_fn tanpi {}
 Tangent of pi times x, with argument reduction before multiplication by pi.
 
constexpr detail::scalar_math::tgamma_fn tgamma {}
 Real Gamma function.
 
constexpr detail::scalar_math::trunc_fn trunc {}
 Round toward zero.
 
constexpr detail::scalar_math::upper_gamma_fn upper_gamma {}
 Upper unregularized incomplete Gamma, with shape and lower integration endpoint.
 
constexpr detail::scalar_math::zeta_fn zeta {}
 Real Riemann zeta with native Euler-Maclaurin evaluation and reflection.
 

Detailed Description

Shared scalar math with native overloads and class-specific ADL customization.

Arguments are read through const references. Unsupported calls are constrained out; class scalars cannot obtain support merely by converting to a native floating type. Scalar overloads retain their exactness and precision rules, including trailing Precision arguments where supported. This interface currently targets host execution.

Function Documentation

◆ abs_squared()

template<class T >
requires requires(T const& value) { math::abs(value) * math::abs(value); }
auto uni20::math::abs_squared ( T const &  value)

Square the magnitude, evaluating the scalar absolute value once.

This does not provide overflow scaling or extra working precision.

Variable Documentation

◆ abs

constexpr detail::scalar_math::abs_fn uni20::math::abs {}
inlineconstexpr

Absolute value or complex magnitude, preserving the selected scalar implementation.

◆ acos

constexpr detail::scalar_math::acos_fn uni20::math::acos {}
inlineconstexpr

Inverse cosine in radians.

◆ acosh

constexpr detail::scalar_math::acosh_fn uni20::math::acosh {}
inlineconstexpr

Inverse hyperbolic cosine.

◆ acospi

constexpr detail::scalar_math::acospi_fn uni20::math::acospi {}
inlineconstexpr

Principal arccosine divided by pi.

◆ agm

constexpr detail::scalar_math::agm_fn uni20::math::agm {}
inlineconstexpr

Nonnegative arithmetic-geometric mean.

Native arguments have the same real type. Zero with a finite argument gives +0; zero with infinity and other negative arguments give NaN. Native evaluation uses scaled iteration; MPFR retains its scalar precision contract.

◆ airy_ai

constexpr detail::scalar_math::airy_ai_fn uni20::math::airy_ai {}
inlineconstexpr

Real Airy Ai; native inputs retain their precision and full negative-axis phase.

MPFR inputs retain their provider-specific range and working-precision rules.

◆ asin

constexpr detail::scalar_math::asin_fn uni20::math::asin {}
inlineconstexpr

Inverse sine in radians.

◆ asinh

constexpr detail::scalar_math::asinh_fn uni20::math::asinh {}
inlineconstexpr

Inverse hyperbolic sine.

◆ asinpi

constexpr detail::scalar_math::asinpi_fn uni20::math::asinpi {}
inlineconstexpr

Principal arcsine divided by pi.

◆ atan

constexpr detail::scalar_math::atan_fn uni20::math::atan {}
inlineconstexpr

Inverse tangent in radians.

◆ atan2

constexpr detail::scalar_math::atan2_fn uni20::math::atan2 {}
inlineconstexpr

Quadrant-aware inverse tangent of y/x in radians.

◆ atan2pi

constexpr detail::scalar_math::atan2pi_fn uni20::math::atan2pi {}
inlineconstexpr

Quadrant-aware arctangent divided by pi.

◆ atanh

constexpr detail::scalar_math::atanh_fn uni20::math::atanh {}
inlineconstexpr

Inverse hyperbolic tangent.

◆ atanpi

constexpr detail::scalar_math::atanpi_fn uni20::math::atanpi {}
inlineconstexpr

Principal arctangent divided by pi.

◆ bessel_j

constexpr detail::scalar_math::bessel_j_fn uni20::math::bessel_j {}
inlineconstexpr

Integer-order Bessel function of the first kind, with order first.

Native absolute orders must fit int; other scalar providers retain their own limits.

Exceptions
std::out_of_rangeif the order cannot be represented by the selected provider.

◆ bessel_y

constexpr detail::scalar_math::bessel_y_fn uni20::math::bessel_y {}
inlineconstexpr

Integer-order Bessel function of the second kind, with order first.

Native absolute orders must fit int; other scalar providers retain their own limits.

Exceptions
std::out_of_rangeif the order cannot be represented by the selected provider.

◆ beta

constexpr detail::scalar_math::beta_fn uni20::math::beta {}
inlineconstexpr

Real Beta function.

Native arguments must have the same real type and both be positive; configured binary128 uses a scaled native Gamma-ratio algorithm. Advertised standard providers remain selected for float/double/long double. See docs/tensor/native_beta.md for fallback accuracy and range behavior.

Note
Affected libstdc++/glibc providers retain an internal signgam data race; see docs/tensor/native_special_functions.md for the provider limitation.

◆ cbrt

constexpr detail::scalar_math::cbrt_fn uni20::math::cbrt {}
inlineconstexpr

Real cube root, including negative arguments.

◆ ceil

constexpr detail::scalar_math::ceil_fn uni20::math::ceil {}
inlineconstexpr

Least integral value not less than the argument, in the scalar's result type.

◆ compound

constexpr detail::scalar_math::compound_fn uni20::math::compound {}
inlineconstexpr

Integer power of one plus x, retaining the original increment.

Requires x >= -1 and a checked signed-64-bit exponent (not bool). Native evaluation uses a typed provider or a guarded expansion; it does not promise correct rounding.

◆ conj

constexpr detail::scalar_math::conj_fn uni20::math::conj {}
inlineconstexpr

Complex conjugation; real and integral values retain their type.

◆ copysign

constexpr detail::scalar_math::copysign_fn uni20::math::copysign {}
inlineconstexpr

Copy the sign while retaining the magnitude operand type and precision.

◆ cos

constexpr detail::scalar_math::cos_fn uni20::math::cos {}
inlineconstexpr

Cosine with scalar-specific precision handling.

◆ cosh

constexpr detail::scalar_math::cosh_fn uni20::math::cosh {}
inlineconstexpr

Hyperbolic cosine.

◆ cospi

constexpr detail::scalar_math::cospi_fn uni20::math::cospi {}
inlineconstexpr

Cosine of pi times x, with argument reduction before multiplication by pi.

◆ cot

constexpr detail::scalar_math::cot_fn uni20::math::cot {}
inlineconstexpr

Reciprocal tangent, retaining the input type and precision.

◆ coth

constexpr detail::scalar_math::coth_fn uni20::math::coth {}
inlineconstexpr

Reciprocal hyperbolic tangent, retaining the input type and precision.

◆ csc

constexpr detail::scalar_math::csc_fn uni20::math::csc {}
inlineconstexpr

Reciprocal sine, retaining the input type and precision.

◆ csch

constexpr detail::scalar_math::csch_fn uni20::math::csch {}
inlineconstexpr

Reciprocal hyperbolic sine, retaining the input type and precision.

◆ digamma

constexpr detail::scalar_math::digamma_fn uni20::math::digamma {}
inlineconstexpr

Logarithmic derivative of Gamma.

Negative integer poles give NaN; signed zero gives an infinity of the opposite sign. Native evaluation uses recurrence and scaled-phase reflection; MPFR retains its scalar precision contract. See docs/tensor/native_digamma.md for absolute/relative accuracy targets near zeros and poles.

◆ dilog_real

constexpr detail::scalar_math::dilog_real_fn uni20::math::dilog_real {}
inlineconstexpr

Real part of the dilogarithm.

Native real arguments use a bounded series with real continuation on x>1. Signed zeros are preserved; both infinite arguments give negative infinity.

◆ erf

constexpr detail::scalar_math::erf_fn uni20::math::erf {}
inlineconstexpr

Real error function.

◆ erfc

constexpr detail::scalar_math::erfc_fn uni20::math::erfc {}
inlineconstexpr

Complementary error function without subtractive cancellation.

◆ exp

constexpr detail::scalar_math::exp_fn uni20::math::exp {}
inlineconstexpr

Natural exponential with scalar-specific precision handling.

◆ exp10

constexpr detail::scalar_math::exp10_fn uni20::math::exp10 {}
inlineconstexpr

Base-ten exponential.

◆ exp10m1

constexpr detail::scalar_math::exp10m1_fn uni20::math::exp10m1 {}
inlineconstexpr

Ten to the power x minus one, using the cancellation-safe provider.

◆ exp2

constexpr detail::scalar_math::exp2_fn uni20::math::exp2 {}
inlineconstexpr

Base-two exponential.

◆ exp2m1

constexpr detail::scalar_math::exp2m1_fn uni20::math::exp2m1 {}
inlineconstexpr

Two to the power x minus one, using the cancellation-safe provider.

◆ expint

constexpr detail::scalar_math::expint_fn uni20::math::expint {}
inlineconstexpr

Real principal-value exponential integral Ei.

Native evaluation uses compensated series, a positive E1 continued fraction and positive-Ei asymptotics, with scaling at range boundaries.

◆ expm1

constexpr detail::scalar_math::expm1_fn uni20::math::expm1 {}
inlineconstexpr

Natural exponential minus one, evaluated without subtractive cancellation.

◆ factorial

constexpr detail::scalar_math::factorial_fn uni20::math::factorial {}
inlineconstexpr

MPFR factorial at an explicit arithmetic state; use uni20::factorial<Real> for a typed result.

◆ fdim

constexpr detail::scalar_math::fdim_fn uni20::math::fdim {}
inlineconstexpr

Positive difference, preserving NaN propagation.

◆ floor

constexpr detail::scalar_math::floor_fn uni20::math::floor {}
inlineconstexpr

Round toward negative infinity.

◆ fma

constexpr detail::scalar_math::fma_fn uni20::math::fma {}
inlineconstexpr

Fused multiplication and addition with one final rounding.

◆ fmax

constexpr detail::scalar_math::fmax_fn uni20::math::fmax {}
inlineconstexpr

Maximum, preferring the numeric operand over a NaN.

◆ fmin

constexpr detail::scalar_math::fmin_fn uni20::math::fmin {}
inlineconstexpr

Minimum, preferring the numeric operand over a NaN.

◆ fmod

constexpr detail::scalar_math::fmod_fn uni20::math::fmod {}
inlineconstexpr

Remainder using a quotient truncated toward zero.

◆ frexp

constexpr detail::scalar_math::frexp_fn uni20::math::frexp {}
inlineconstexpr

Binary fraction and exponent as an owning result.

◆ hypot

constexpr detail::scalar_math::hypot_fn uni20::math::hypot {}
inlineconstexpr

Euclidean length with scalar-specific overflow and underflow handling.

◆ ilogb

constexpr detail::scalar_math::ilogb_fn uni20::math::ilogb {}
inlineconstexpr

Binary exponent of a finite nonzero value; throws otherwise.

◆ imag

constexpr detail::scalar_math::imag_fn uni20::math::imag {}
inlineconstexpr

Read the imaginary component by value; real zero retains the input's type and precision.

◆ isfinite

constexpr detail::scalar_math::isfinite_fn uni20::math::isfinite {}
inlineconstexpr

Whether a real scalar is finite.

◆ isinf

constexpr detail::scalar_math::isinf_fn uni20::math::isinf {}
inlineconstexpr

Whether a real scalar is infinite.

◆ isnan

constexpr detail::scalar_math::isnan_fn uni20::math::isnan {}
inlineconstexpr

Whether a real scalar is NaN.

◆ ldexp

constexpr detail::scalar_math::ldexp_fn uni20::math::ldexp {}
inlineconstexpr

Multiply by a power of two using the scalar's exponent interface.

◆ lgamma

constexpr detail::scalar_math::lgamma_fn uni20::math::lgamma {}
inlineconstexpr

Logarithm of the absolute Gamma function; native providers are reentrant.

◆ lgamma_sign

constexpr detail::scalar_math::lgamma_sign_fn uni20::math::lgamma_sign {}
inlineconstexpr

Log-absolute-Gamma and its sign as owning values.

Undefined signs are zero; signed zero retains its one-sided pole sign.

◆ log

constexpr detail::scalar_math::log_fn uni20::math::log {}
inlineconstexpr

Natural logarithm with scalar-specific precision handling.

◆ log10

constexpr detail::scalar_math::log10_fn uni20::math::log10 {}
inlineconstexpr

Base-ten logarithm.

◆ log10p1

constexpr detail::scalar_math::log10p1_fn uni20::math::log10p1 {}
inlineconstexpr

Base-ten logarithm of one plus x, without rounding the sum first.

◆ log1p

constexpr detail::scalar_math::log1p_fn uni20::math::log1p {}
inlineconstexpr

Natural logarithm of one plus the argument, retaining small increments.

◆ log2

constexpr detail::scalar_math::log2_fn uni20::math::log2 {}
inlineconstexpr

Base-two logarithm where supplied by the scalar implementation.

◆ log2p1

constexpr detail::scalar_math::log2p1_fn uni20::math::log2p1 {}
inlineconstexpr

Base-two logarithm of one plus x, without rounding the sum first.

◆ modf

constexpr detail::scalar_math::modf_fn uni20::math::modf {}
inlineconstexpr

Signed fractional and integral parts as an owning result.

◆ next_down

constexpr detail::scalar_math::next_down_fn uni20::math::next_down {}
inlineconstexpr

Adjacent value toward negative infinity.

◆ next_up

constexpr detail::scalar_math::next_up_fn uni20::math::next_up {}
inlineconstexpr

Adjacent value toward positive infinity.

◆ nextafter

constexpr detail::scalar_math::nextafter_fn uni20::math::nextafter {}
inlineconstexpr

Adjacent value on the first operand grid toward the direction operand.

◆ pow

constexpr detail::scalar_math::pow_fn uni20::math::pow {}
inlineconstexpr

Power with the selected scalar's domain, exactness and precision rules.

◆ pown

constexpr detail::scalar_math::pown_fn uni20::math::pown {}
inlineconstexpr

Integer power with scalar-specific rounding.

◆ real

constexpr detail::scalar_math::real_fn uni20::math::real {}
inlineconstexpr

Read the real component by value; real and integral scalars retain their type.

◆ remainder

constexpr detail::scalar_math::remainder_fn uni20::math::remainder {}
inlineconstexpr

Remainder using the nearest-even integer quotient.

◆ remquo

constexpr detail::scalar_math::remquo_fn uni20::math::remquo {}
inlineconstexpr

Nearest-even remainder and signed low three quotient bits.

◆ rootn

constexpr detail::scalar_math::rootn_fn uni20::math::rootn {}
inlineconstexpr

Real integer-order root; negative orders give reciprocal roots.

◆ round

constexpr detail::scalar_math::round_fn uni20::math::round {}
inlineconstexpr

Round to nearest integer with ties away from zero.

◆ round_even

constexpr detail::scalar_math::round_even_fn uni20::math::round_even {}
inlineconstexpr

Nearest integer with ties to even.

◆ scalbn

constexpr detail::scalar_math::scalbn_fn uni20::math::scalbn {}
inlineconstexpr

Binary scaling with a signed 64-bit exponent.

◆ sec

constexpr detail::scalar_math::sec_fn uni20::math::sec {}
inlineconstexpr

Reciprocal cosine, retaining the input type and precision.

◆ sech

constexpr detail::scalar_math::sech_fn uni20::math::sech {}
inlineconstexpr

Reciprocal hyperbolic cosine, retaining the input type and precision.

◆ signbit

constexpr detail::scalar_math::signbit_fn uni20::math::signbit {}
inlineconstexpr

Inspect the sign, including approximate negative zero.

◆ sin

constexpr detail::scalar_math::sin_fn uni20::math::sin {}
inlineconstexpr

Sine with scalar-specific precision handling.

◆ sincos

constexpr detail::scalar_math::sincos_fn uni20::math::sincos {}
inlineconstexpr

Sine and cosine at one input.

◆ sinh

constexpr detail::scalar_math::sinh_fn uni20::math::sinh {}
inlineconstexpr

Hyperbolic sine.

◆ sinhcosh

constexpr detail::scalar_math::sinhcosh_fn uni20::math::sinhcosh {}
inlineconstexpr

Hyperbolic sine and cosine at one input.

◆ sinpi

constexpr detail::scalar_math::sinpi_fn uni20::math::sinpi {}
inlineconstexpr

Sine of pi times x, with argument reduction before multiplication by pi.

◆ sqrt

constexpr detail::scalar_math::sqrt_fn uni20::math::sqrt {}
inlineconstexpr

Square root; exact inputs requiring approximation need an explicit finite precision.

◆ tan

constexpr detail::scalar_math::tan_fn uni20::math::tan {}
inlineconstexpr

Tangent in radians.

◆ tanh

constexpr detail::scalar_math::tanh_fn uni20::math::tanh {}
inlineconstexpr

Hyperbolic tangent.

◆ tanpi

constexpr detail::scalar_math::tanpi_fn uni20::math::tanpi {}
inlineconstexpr

Tangent of pi times x, with argument reduction before multiplication by pi.

◆ tgamma

constexpr detail::scalar_math::tgamma_fn uni20::math::tgamma {}
inlineconstexpr

Real Gamma function.

◆ trunc

constexpr detail::scalar_math::trunc_fn uni20::math::trunc {}
inlineconstexpr

Round toward zero.

◆ upper_gamma

constexpr detail::scalar_math::upper_gamma_fn uni20::math::upper_gamma {}
inlineconstexpr

Upper unregularized incomplete Gamma, with shape and lower integration endpoint.

Native arguments must have matching real types. For a finite shape and positive endpoint, this is the positive integral from x to infinity; negative shapes are supported. At x=0 use the analytic Gamma endpoint. See docs/tensor/native_upper_gamma.md for domain and accuracy contracts. MPFR retains its scalar precision contract.

◆ zeta

constexpr detail::scalar_math::zeta_fn uni20::math::zeta {}
inlineconstexpr

Real Riemann zeta with native Euler-Maclaurin evaluation and reflection.

Native arguments retain their type, including binary128. Exact negative even integers give positive zero; the pole at one gives positive infinity.