static double sinh(double x)
描述 (Description)
java.lang.StrictMath.sinh()方法返回double值的双曲正弦值。 x的双曲正弦定义为(e x - e -x )/2 ,其中e是Euler's number包括这些情况 -
- 如果参数是NaN或无穷大,则结果为NaN。
- 如果参数是无穷大,则结果是无穷大,其符号与参数相同。
- 如果参数为零,则结果为零,其参数符号相同。
声明 (Declaration)
以下是java.lang.StrictMath.sinh()方法的声明
public static double sinh(double x)
参数 (Parameters)
x - 这是要返回双曲正弦的数字。
返回值 (Return Value)
此方法返回x的双曲正弦值。
异常 (Exception)
NA
例子 (Example)
以下示例显示了java.lang.StrictMath.sinh()方法的用法。
package com.iowiki;
import java.lang.*;
public class StrictMathDemo {
public static void main(String[] args) {
double d1 = (90*Math.PI)/180 , d2 = 50, d3 = 0;
// returns the hyperbolic sine of a double value
double sinhValue = StrictMath.sinh(d1);
System.out.println("Hyperbolic sine of d1 = " + sinhValue);
sinhValue = StrictMath.sinh(d2);
System.out.println("Hyperbolic sine of d2 = " + sinhValue);
sinhValue = StrictMath.sinh(d3);
System.out.println("Hyperbolic sine of d3 = " + sinhValue);
}
}
让我们编译并运行上面的程序,这将产生以下结果 -
Hyperbolic sin of d1 = 2.3012989023072947
Hyperbolic sin of d2 = 2.592352764293536E21
Hyperbolic sin of d3 = 0.0