From: Luke Kenneth Casson Leighton Date: Sun, 10 Oct 2021 20:06:26 +0000 (+0100) Subject: whoops conversion of list of 0/1 needed reversing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa0c5b51b27339f0422bcd7eae8c8c9d511b65d0;p=ieee754fpu.git whoops conversion of list of 0/1 needed reversing --- 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]))