8288933: Improve the implementation of Double/Float.isInfinite

Reviewed-by: redestad, darcy
This commit is contained in:
Quan Anh Mai 2022-09-09 17:01:57 +00:00 committed by Joe Darcy
parent 00befddd7c
commit a14c3a493a
2 changed files with 2 additions and 2 deletions

View file

@ -765,7 +765,7 @@ public final class Double extends Number
*/
@IntrinsicCandidate
public static boolean isInfinite(double v) {
return (v == POSITIVE_INFINITY) || (v == NEGATIVE_INFINITY);
return Math.abs(v) > MAX_VALUE;
}
/**