mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8288933: Improve the implementation of Double/Float.isInfinite
Reviewed-by: redestad, darcy
This commit is contained in:
parent
00befddd7c
commit
a14c3a493a
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -586,7 +586,7 @@ public final class Float extends Number
|
|||
*/
|
||||
@IntrinsicCandidate
|
||||
public static boolean isInfinite(float v) {
|
||||
return (v == POSITIVE_INFINITY) || (v == NEGATIVE_INFINITY);
|
||||
return Math.abs(v) > MAX_VALUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue