expm1 function

dynamic expm1(
  1. dynamic x
)

Precision expm1

Computes e^x - 1 with precision for small x. Supports num and Complex inputs.

Implementation

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