mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8226721: Missing intrinsics for Math.ceil, floor, rint
Reviewed-by: neliasso, vlivanov, ecaspole
This commit is contained in:
parent
09c012be4e
commit
d3ca3a02ff
19 changed files with 434 additions and 2 deletions
|
@ -440,6 +440,7 @@ public final class Math {
|
|||
* floating-point value that is greater than or equal to
|
||||
* the argument and is equal to a mathematical integer.
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
public static double ceil(double a) {
|
||||
return StrictMath.ceil(a); // default impl. delegates to StrictMath
|
||||
}
|
||||
|
@ -459,6 +460,7 @@ public final class Math {
|
|||
* floating-point value that less than or equal to the argument
|
||||
* and is equal to a mathematical integer.
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
public static double floor(double a) {
|
||||
return StrictMath.floor(a); // default impl. delegates to StrictMath
|
||||
}
|
||||
|
@ -478,6 +480,7 @@ public final class Math {
|
|||
* @return the closest floating-point value to {@code a} that is
|
||||
* equal to a mathematical integer.
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
public static double rint(double a) {
|
||||
return StrictMath.rint(a); // default impl. delegates to StrictMath
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue