Java Math.sinh(double x)
Syntax
Math.sinh(double x) has the following syntax.
public static double sinh(double x)
Example
In the following code shows how to use Math.sinh(double x) method.
public class Main {
/*from w w w . ja v a2 s .co m*/
public static void main(String[] args) {
double x = 45;
double y = -180;
// convert them to radians
x = Math.toRadians(x);
y = Math.toRadians(y);
// print the hyperbolic sine for these doubles
System.out.println("sinh(" + x + ")=" + Math.sinh(x));
System.out.println("sinh(" + y + ")=" + Math.sinh(y));
}
}
The code above generates the following result.