2015-03-03 11:45:39 -05:00
|
|
|
# test bignum comparisons
|
|
|
|
|
|
|
|
i = 1 << 65
|
2021-12-21 02:00:11 -05:00
|
|
|
cases = (0, 1, -1, i, -i, i + 1, -(i + 1))
|
2015-03-03 11:45:39 -05:00
|
|
|
|
2021-12-21 02:00:11 -05:00
|
|
|
for lhs in cases:
|
|
|
|
for rhs in cases:
|
|
|
|
print("{} == {} = {}".format(lhs, rhs, lhs == rhs))
|
|
|
|
print("{} != {} = {}".format(lhs, rhs, lhs != rhs))
|
|
|
|
print("{} < {} = {}".format(lhs, rhs, lhs < rhs))
|
|
|
|
print("{} > {} = {}".format(lhs, rhs, lhs > rhs))
|
|
|
|
print("{} <= {} = {}".format(lhs, rhs, lhs <= rhs))
|
|
|
|
print("{} >= {} = {}".format(lhs, rhs, lhs >= rhs))
|