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.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable