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 input, carried to negative input by
.
Parameters
inputTensorReal-valued input; a bool or integer one is taken at the default float.
Returns
TensorSame shape as input, values in .
Examples
>>> import lucid
>>> abs(lucid.erfc(lucid.tensor(4.0)).item() - 1.5417e-08) < 1e-12
True