![]() |
VOOZH | about |
The tanh() is an inbuilt function in Ruby returns the hyperbolic tangent of value given in radians. The value passed is in range [-inf, +inf]. The returned value is in range [-1, +1].
Syntax: Math.tanh(value) Parameters: The function accepts one mandatory parameter value whose corresponding hyperbolic tangent value is returned. Return Value: It returns the hyperbolic tangent value.
Example 1:
Output:
-1.0 0.5849798828807289 1.0 -1.0
Example 2:
Output:
0.0 1.0 -1.0 -0.9999877116507956