Add more tests for multi-precision integers.
This commit is contained in:
parent
9d68e9ccdd
commit
b068b21742
4
tests/basics/int-big-lshift.py
Normal file
4
tests/basics/int-big-lshift.py
Normal 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)
|
8
tests/basics/int-big-mul.py
Normal file
8
tests/basics/int-big-mul.py
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user