Skip to main content
Standard normal CDF Phi(x). DuckDB has no erf/normal CDF builtin, so we use the Zelen & Severo rational approximation (Abramowitz & Stegun 26.2.17): max absolute error ~7.5e-8 over the whole real line far below any calibration tolerance we care about. Phi(x) = 1 - phi(x) * t * (b1 + t(b2 + t(b3 + t(b4 + t b5)))), t = 1/(1+p|x|) with phi(x) = exp(-x^2/2)/sqrt(2*pi); reflected for x < 0 via Phi(x)=1-Phi(-x). Pass a simple column / scalar expression (it is inlined several times).

Signature