Skip to content

Commit 4fa66e4

Browse files
committed
Add check for finite number to large exponent case.
1 parent a58c816 commit 4fa66e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/core/numeric/FloatNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ protected static boolean hasNoExp(double value) {
900900

901901
protected static boolean hasLargeExp(double value) {
902902
double abs = Math.abs(value);
903-
return (abs >= 1_000_000_000_000_000.0);
903+
return Double.isFinite(abs) && (abs >= 1_000_000_000_000_000.0);
904904
}
905905

906906
protected static boolean hasSmallExp(double value) {

0 commit comments

Comments
 (0)