We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8886403 commit a318191Copy full SHA for a318191
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/ints/IntBuiltins.java
@@ -408,7 +408,7 @@ int doLPiOvf(int left, PInt right) {
408
try {
409
return Math.floorDiv(left, right.intValueExact());
410
} catch (ArithmeticException e) {
411
- return 0;
+ return left < 0 == right.isNegative() ? 0 : -1;
412
}
413
414
@@ -424,7 +424,7 @@ long doLPiOvf(long left, PInt right) {
424
425
return Math.floorDiv(left, right.longValueExact());
426
427
428
429
430
0 commit comments