Skip to content

Commit 51cc1ba

Browse files
committed
Fix math.hypot
1 parent 8b8d6b2 commit 51cc1ba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,11 +1993,7 @@ public double hypot2(VirtualFrame frame, @SuppressWarnings("unused") Object self
19931993
}
19941994
double x = xCastNode.execute(frame, arguments[0]);
19951995
double y = yCastNode.execute(frame, arguments[1]);
1996-
double result = Math.hypot(x, y);
1997-
if (Double.isInfinite(result) && Double.isFinite(x) && Double.isFinite(y)) {
1998-
throw raise(OverflowError, "math range error");
1999-
}
2000-
return result;
1996+
return Math.hypot(x, y);
20011997
}
20021998

20031999
@Specialization

0 commit comments

Comments
 (0)