tools/reciprocal.py: Avoid 'past' module (#1590)
This script uses python3, so the 'range' function is memory-efficient. Signed-off-by: Tim Retout <tim@retout.co.uk>
This commit is contained in:
parent
edcb605fee
commit
c1c9dd5bff
1 changed files with 1 additions and 2 deletions
|
|
@ -16,7 +16,6 @@
|
|||
from math import floor, ceil
|
||||
import argparse
|
||||
import sys
|
||||
from past.builtins import xrange
|
||||
|
||||
# now unsigned
|
||||
|
||||
|
|
@ -49,7 +48,7 @@ if __name__ == "__main__":
|
|||
|
||||
print("Doing sanity check")
|
||||
# sanity check
|
||||
for i in xrange(2**32-1):
|
||||
for i in range(2**32-1):
|
||||
q1, q2 = (i / args.divisor, do_div(i))
|
||||
if int(q1) != q2:
|
||||
print("Combination failed %d %d %d" % i, q1, q2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue