8226721: Missing intrinsics for Math.ceil, floor, rint

Reviewed-by: neliasso, vlivanov, ecaspole
This commit is contained in:
Jatin Bhateja 2019-10-01 11:43:10 +02:00 committed by Nils Eliasson
parent 09c012be4e
commit d3ca3a02ff
19 changed files with 434 additions and 2 deletions

View file

@ -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
}