From c1c9dd5bff69f5ea078d341a47555ad485808ab4 Mon Sep 17 00:00:00 2001 From: Tim Retout Date: Wed, 10 Jun 2026 20:36:21 +0100 Subject: [PATCH] tools/reciprocal.py: Avoid 'past' module (#1590) This script uses python3, so the 'range' function is memory-efficient. Signed-off-by: Tim Retout --- tools/reciprocal.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/reciprocal.py b/tools/reciprocal.py index 0c0061c59..9cd0b6656 100755 --- a/tools/reciprocal.py +++ b/tools/reciprocal.py @@ -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)