From aa0c5b51b27339f0422bcd7eae8c8c9d511b65d0 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 10 Oct 2021 21:06:26 +0100 Subject: [PATCH] whoops conversion of list of 0/1 needed reversing --- src/ieee754/part/layout_experiment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ieee754/part/layout_experiment.py b/src/ieee754/part/layout_experiment.py index 91cd4c46..86cae066 100644 --- a/src/ieee754/part/layout_experiment.py +++ b/src/ieee754/part/layout_experiment.py @@ -113,7 +113,7 @@ if __name__ == '__main__': # check the results against bitp static-expected partition points # https://bugs.libre-soc.org/show_bug.cgi?id=713#c47 # https://stackoverflow.com/a/27165694 - ival = int(''.join(map(str, map(int, ppt))), 2) + ival = int(''.join(map(str, ppt[::-1])), 2) assert ival == bitp[i] sim = Simulator(m) @@ -142,7 +142,7 @@ if __name__ == '__main__': # check the results against bitp static-expected partition points # https://bugs.libre-soc.org/show_bug.cgi?id=713#c47 # https://stackoverflow.com/a/27165694 - ival = int(''.join(map(str, map(int, ppt))), 2) + ival = int(''.join(map(str, ppt[::-1])), 2) assert ival == bitp[i], "ival %s actual %s" % (bin(ival), bin(bitp[i])) -- 2.30.2