Complementary error function .
Computed directly, not as 1 - erf(x): past x ≈ 4 that
difference is a few units of float32's spacing below one, so
erfc(4) came back 0 where the answer is 1.54e-8 — and every tail
probability built on it inherited the zero. The form used is the
Chebyshev fit from Numerical Recipes (erfcc), whose relative error
stays below 1.2e-7 for every x, carried to negative x by
.
Parameters
Real-valued input.
Returns
TensorSame shape as x, values in .
Examples
>>> import lucid
>>> abs(lucid.erfc(lucid.tensor(4.0)).item() - 1.5417e-08) < 1e-12
True