3ab6aa3a6d
Tests which don't work with small ints are suffixed with _intbig.py. Some of these may still work with long long ints and need to be reclassified later.
10 lines
253 B
Python
10 lines
253 B
Python
# test builtin abs
|
|
|
|
# bignum
|
|
print(abs(123456789012345678901234567890))
|
|
print(abs(-123456789012345678901234567890))
|
|
|
|
# edge cases for 32 and 64 bit archs (small int overflow when negating)
|
|
print(abs(-0x3fffffff - 1))
|
|
print(abs(-0x3fffffffffffffff - 1))
|