tanhPrime function

double tanhPrime(
  1. double x
)

The derivative of the Hyperbolic Tangent

Implementation

double tanhPrime(double x) => 1.0 - pow(tanh(x), 2);