Java.lang.StrictMath.sinh() 方法
描述
java.lang.StrictMath.sinh() 方法返回双曲值的双曲正弦值。 x 的双曲正弦定义为 (ex - e-x)/2 其中 e 是 欧拉数。包括这些情况 −
- 如果参数为 NaN 或无穷大,则结果为 NaN。
- 如果参数是无限的,则结果是与参数相同符号的无穷大。
- 如果参数为零,则结果为零,符号与参数相同。
声明
以下是 java.lang.StrictMath.sinh() 方法的声明。
public static double sinh(double x)
参数
x − 这是要返回其双曲正弦的数字。
返回值
此方法返回 x 的双曲正弦值。
异常
NA
示例
下面的例子展示了 java.lang.StrictMath.sinh() 方法的使用。
package com.tutorialspoint;
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

