List of usage examples for java.lang StrictMath sinh
public static native double sinh(double x);
From source file:Main.java
public static void main(String[] args) { double d1 = (90 * Math.PI) / 180, d2 = 50, d3 = 0; System.out.println("Hyperbolic sine of d1 = " + StrictMath.sinh(d1)); System.out.println("Hyperbolic sine of d2 = " + StrictMath.sinh(d2)); System.out.println("Hyperbolic sine of d3 = " + StrictMath.sinh(d3)); }
From source file:org.esa.beam.util.math.FastMathPerformance.java
public void testSinh() { System.gc();//from w ww.j a v a 2s . co m double x = 0; long time = System.nanoTime(); for (int i = 0; i < RUNS; i++) x += StrictMath.sinh(i * F1); long strictTime = System.nanoTime() - time; System.gc(); double y = 0; time = System.nanoTime(); for (int i = 0; i < RUNS; i++) y += FastMath.sinh(i * F1); long fastTime = System.nanoTime() - time; System.gc(); double z = 0; time = System.nanoTime(); for (int i = 0; i < RUNS; i++) z += Math.sinh(i * F1); long mathTime = System.nanoTime() - time; report("sinh", x + y + z, strictTime, fastTime, mathTime); }