Skip to main content

Module f64

Module f64 

Source
Expand description

The f64 slice entry points are also available as free functions here.

Functions§

acos
Arc cosine function; 1.0 ULP.
acos_u35
Arc cosine function, 3.5 ULP tier.
acosh
Inverse hyperbolic cosine function; 1.0 ULP.
asin
Arc sine function; 1.0 ULP.
asin_u35
Arc sine function, 3.5 ULP tier.
asinh
Inverse hyperbolic sine function; 1.0 ULP.
atan
Arc tangent function; 1.0 ULP.
atan2
Arc tangent of two arguments; 1.0 ULP.
atan_u35
Arc tangent function, 3.5 ULP tier.
atanh
Inverse hyperbolic tangent function; 1.0 ULP.
cbrt
Cube root function; 1.0 ULP.
cbrt_u35
Cube root, 3.5 ULP tier.
cos
Cosine function; 1.0 ULP.
cos_deterministic
Cosine, bitwise identical across lanes and platforms; 1.0 ULP.
cos_deterministic_u35
Cosine, lane-order independent, 3.5 ULP tier.
cos_u35
Cosine function, 3.5 ULP tier.
cosh
Hyperbolic cosine function; 1.0 ULP.
cosh_u35
Hyperbolic cosine, 3.5 ULP tier.
cospi
Cosine of pi * x; 0.506 ULP.
erf
Error function; 1.0 ULP.
erfc
Complementary error function; max(1.5, 2.5) ULP.
exp
Natural exponential function; 1.0 ULP.
exp2
Base-2 exponential function; 1.0 ULP.
exp2_u35
Base-2 exponential, 3.5 ULP tier.
exp10
Base-10 exponential function; 1.09 ULP.
exp10_u35
Base-10 exponential, 3.5 ULP tier.
expm1
Natural exponential function minus one; 1.0 ULP.
gelu
Exact-form GELU x/2 * (1 + erf(x / sqrt(2))) in one pass. See the kernel (crate::f32x::activation::gelu / crate::f64x::activation::gelu) for the error bound: the f32 kernel evaluates erf as PyTorch’s CPU GELU does (absolute error about 5e-7 on erf after rounding, so 3.0e-7 * |x| plus 3 ULP on the result), the f64 kernel uses the 1.0 ULP erf.
gelu_tanh
GELU tanh approximation x/2 * (1 + tanh(sqrt(2/pi) * (x + 0.044715 x^3))) in one pass; 3.0 ULP for x >= 0, see the kernel for x < 0.
hypot
Euclidean distance in two dimensions; 0.5001 ULP.
i0e
Exponentially scaled modified Bessel function exp(-|x|) I0(x); never overflows. Bound: see the kernel.
i1e
Exponentially scaled modified Bessel function exp(-|x|) I1(x); never overflows, odd in x. Bound: see the kernel.
lgamma
Logarithm of the absolute gamma function; 1.0 ULP.
log
Natural logarithm; 1.0 ULP.
log2
Base-2 logarithm; 1.0 ULP.
log1p
Logarithm of one plus the argument; 1.0 ULP.
log2_u35
Base-2 logarithm, 3.5 ULP tier.
log10
Base-10 logarithm; 1.0 ULP.
log_u35
Natural logarithm, 3.5 ULP tier.
pow
Argument raised to an argument power; 1.0 ULP.
sigmoid
Logistic sigmoid 1 / (1 + exp(-x)) in one pass, overflow-free; 2.5 ULP.
silu
SiLU / swish x * sigmoid(x) in one pass; 3.5 ULP wherever exp(-|x|) is normal (see the kernel for the subnormal tail).
sin
Sine function; 1.0 ULP.
sin_deterministic
Sine, bitwise identical across lanes and platforms; 1.0 ULP.
sin_deterministic_u35
Sine, lane-order independent, 3.5 ULP tier.
sin_u35
Sine function, 3.5 ULP tier.
sincos
Sine and cosine evaluated together; 1.0 ULP.
sincos_deterministic
Sine and cosine together, lane-order independent; 1.0 ULP.
sincos_deterministic_u35
Sine and cosine together, lane-order independent, 3.5 ULP tier.
sincos_u35
Sine and cosine evaluated together, 3.5 ULP tier.
sincospi
Sine and cosine of pi * x together; 0.506 ULP.
sincospi_u35
Sine and cosine of pi * x together, 3.5 ULP tier.
sinh
Hyperbolic sine function; 1.0 ULP.
sinh_u35
Hyperbolic sine, 3.5 ULP tier.
sinpi
Sine of pi * x; 0.506 ULP.
softplus
Softplus log(1 + exp(x)) in one pass, overflow-free; 3.0 ULP.
sqrt
Square root; 0.5 ULP.
tan
Tangent function; 1.0 ULP.
tan_deterministic
Tangent, bitwise identical across lanes and platforms; 1.0 ULP.
tan_deterministic_u35
Tangent, lane-order independent, 3.5 ULP tier.
tan_u35
Tangent function, 3.5 ULP tier.
tanh
Hyperbolic tangent function; 1.0 ULP.
tanh_u35
Hyperbolic tangent, 3.5 ULP tier.
tgamma
Gamma function; 1.0 ULP.
xlogy
x * ln(y), defined as 0 when x == 0 and y is not NaN (SciPy’s xlogy). Bound: see the kernel.