asin method

Complex asin()

Arcsine

Compute the inverse sine of this complex number.

Implements the formula:

asin(z) = -i (log(sqrt(1 - z^2) + iz))

Returns nan if either real or imaginary part of the input argument is NaN or infinite.

Implementation

Complex asin() {
  if (isNaN) return Complex.nan;
  return (sqrt1z() + (this * Complex.i)).log() * -Complex.i;
}