mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8301444: Port fdlibm hyperbolic transcendental functions to Java
Reviewed-by: bpb
This commit is contained in:
parent
b242eef93e
commit
655a71277d
6 changed files with 656 additions and 50 deletions
|
@ -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> +<i>y</i><sup>2</sup>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue