Add more tests for multi-precision integers.
This commit is contained in:
parent
9d68e9ccdd
commit
b068b21742
|
@ -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)
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue