1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Host-side scalar special functions shared by the CPU parity references of
//! the GPU backends.
//!
//! The CUDA kernels emit their own NVRTC-visible numerics (see
//! [`crate::gpu::numerics_device`]); this module is the matching **host** side
//! used by the CPU parity oracles (`bms_flex_row`'s test oracle) and the
//! CPU reference path (`pirls_row`'s probit CDF). Keeping a single definition
//! here means the host `erfc` cannot drift between backends.
/// Complementary error function `erfc(x) = 1 − erf(x)` evaluated on the host.
///
/// Branchless Chebyshev rational approximation (Cody 1969): matches f64 libm
/// to within ~1 ULP across the input range and is what the GPU kernels'
/// analytic implementation derives from. Used so the CPU reference does not
/// depend on a feature-gated `libm` dependency.
pub