Skip to content

Commit e4d2d01

Browse files
committed
Handle NaN result in math.log1p by raising ValueError
1 parent b9dcb93 commit e4d2d01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/MathModuleBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ public double count(double value) {
18581858
return value;
18591859
}
18601860
double result = Math.log1p(value);
1861-
checkMathDomainError(Double.isInfinite(result));
1861+
checkMathDomainError(!Double.isFinite(result));
18621862
return result;
18631863
}
18641864
}

0 commit comments

Comments
 (0)