erf function

dynamic erf(
  1. dynamic x
)

Error Function

Computes the error function erf(z). Supports num and Complex inputs.

Implementation

dynamic erf(dynamic x) {
  if (x is Complex) return x.erf();
  if (x is num) return _handleResult(Complex(x).erf(), true);
  throw ArgumentError('erf requires num or Complex');
}