atanh function

Complex<num, num> atanh(
  1. Complex<num, num> complex
)

Return the inverse hyperbolic tangent of complex. There are two branch cuts: One extends from 1 along the real axis to ∞, continuous from below. The other extends from -1 along the real axis to -∞, continuous from above.

Implementation

Complex<num, num> atanh(Complex complex) {
  var val = (Complex(1, 0) + complex) / (Complex(1, 0) - complex);

  return log(val) * Complex(1 / 2);
}