bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Math tanh() Method

❮ Math Methods

Example

System.out.println(Math.tanh(3));
System.out.println(Math.tanh(-3));
System.out.println(Math.tanh(0));
System.out.println(Math.tanh(1));

Definition and Usage

The tanh() method returns the hyperbolic tangent of a number.

The hyperbolic tangent is equivalent to Math.sinh(number) / Math.cosh(number) .

Syntax

public static double tanh(double
number )

Parameter Values

ParameterDescription
numberRequired. A number to find the hyperbolic tangent of.

Technical Details

Returns:A double value representing the hyperbolic tangent of a number.
Java version:1.5+

Previous

Java Math tan() Method

Next

Java Math toDegrees() Method