coth function

double coth (double angle)

Hyperbolic Cotangent.

Implementation

double coth(double angle) {
  if (angle > 19.115) {
    return 1.0;
  }

  if (angle < -19.115) {
    return -1.0;
  }

  var e1 = stdmath.exp(angle);
  var e2 = stdmath.exp(-angle);
  return (e1 + e2) / (e1 - e2);
}