aneforge/special.py implements erfc (line ~57) but not erf. Add erf, the natural companion:
def erf(x: Tensor) -> Tensor:
return _const(x, 1.0) - erfc(x) # erf(x) = 1 - erfc(x)
(or share the underlying polynomial directly if that is cleaner given how erfc is built -- follow the existing _horner / _poly_in style in the file).
Oracle: scipy.special.erf. Add a case to the module self-test (special.py's _selftest, matching how erfc/expm1/log1p are checked) over a spread of x in roughly [-4, 4].
Testing: the numeric check dispatches, so run it on any Apple Silicon Mac and note in the PR that it passed locally; CI runs only the off-device/build subset.
aneforge/special.pyimplementserfc(line ~57) but noterf. Adderf, the natural companion:(or share the underlying polynomial directly if that is cleaner given how
erfcis built -- follow the existing_horner/_poly_instyle in the file).Oracle:
scipy.special.erf. Add a case to the module self-test (special.py's_selftest, matching howerfc/expm1/log1pare checked) over a spread of x in roughly[-4, 4].Testing: the numeric check dispatches, so run it on any Apple Silicon Mac and note in the PR that it passed locally; CI runs only the off-device/build subset.