慈溪机械加工网/seo公司网站
全屏
java.lang.StrictMath.sinh()方法返回double值的双曲正弦值。 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 cn.sxt;
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
分享到:
0评论