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 d84af24 commit e427508Copy full SHA for e427508
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinFunctions.java
@@ -279,11 +279,16 @@ protected String bigToString(BigInteger x) {
279
return x.toString(2);
280
}
281
282
+ @TruffleBoundary
283
+ protected BigInteger bigAbs(BigInteger x) {
284
+ return x.abs();
285
+ }
286
+
287
@Specialization
288
String doL(long x,
289
@Cached ConditionProfile isMinLong) {
290
if (isMinLong.profile(x == Long.MIN_VALUE)) {
- return buildString(true, bigToString(PInt.longToBigInteger(x).abs()));
291
+ return buildString(true, bigToString(bigAbs(PInt.longToBigInteger(x))));
292
293
return buildString(x < 0, longToString(Math.abs(x)));
294
0 commit comments