Add more tests for multi-precision integers.

pull/342/head
Damien George 2014-03-12 15:39:51 +00:00
rodzic 9d68e9ccdd
commit b068b21742
2 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -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