Add more tests for multi-precision integers.

This commit is contained in:
Damien George 2014-03-12 15:39:51 +00:00
parent 9d68e9ccdd
commit b068b21742
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,4 @@
# tests transition from small to large int representation by left-shift operation
for i in range(1, 17):
for shift in range(70):
print(i, '<<', shift, '=', i << shift)

View File

@ -0,0 +1,8 @@
# tests transition from small to large int representation by multiplication
for rhs in range(2, 11):
lhs = 1
for k in range(100):
res = lhs * rhs
print(lhs, '*', rhs, '=', res)
lhs = res