Calculate the hyperbolic tangent of a number