8301444: Port fdlibm hyperbolic transcendental functions to Java

Reviewed-by: bpb
This commit is contained in:
Joe Darcy 2023-02-17 03:22:06 +00:00
parent b242eef93e
commit 655a71277d
6 changed files with 656 additions and 50 deletions

View file

@ -2081,7 +2081,9 @@ public final class StrictMath {
* @return The hyperbolic sine of {@code x}.
* @since 1.5
*/
public static native double sinh(double x);
public static double sinh(double x) {
return FdLibm.Sinh.compute(x);
}
/**
* Returns the hyperbolic cosine of a {@code double} value.
@ -2105,7 +2107,9 @@ public final class StrictMath {
* @return The hyperbolic cosine of {@code x}.
* @since 1.5
*/
public static native double cosh(double x);
public static double cosh(double x) {
return FdLibm.Cosh.compute(x);
}
/**
* Returns the hyperbolic tangent of a {@code double} value.
@ -2136,7 +2140,9 @@ public final class StrictMath {
* @return The hyperbolic tangent of {@code x}.
* @since 1.5
*/
public static native double tanh(double x);
public static double tanh(double x) {
return FdLibm.Tanh.compute(x);
}
/**
* Returns sqrt(<i>x</i><sup>2</sup>&nbsp;+<i>y</i><sup>2</sup>)