Java Math.tanh() method21 Mar 2025 | 2 min read The java.lang.Math.tanh() is used to return the hyperbolic tangent of a value. The hyperbolic tangent of any value x can be defined as ((ex - e -x)/2) / ((ex + e -x)/2), where e is an Euler's number. We can say that tanh(a) = sinh(a)/cosh(a). SyntaxParameterReturn
Example 1Output: 0.9999999999244973 Example 2Output: 1.0 Example 3Output: -0.0 Example 4Output: NaN Example 5Output: -1.0 Next TopicJava Math |
We request you to subscribe our newsletter for upcoming updates.

We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India