whoops conversion of list of 0/1 needed reversing
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 10 Oct 2021 20:06:26 +0000 (21:06 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 10 Oct 2021 20:06:26 +0000 (21:06 +0100)
src/ieee754/part/layout_experiment.py

index 91cd4c46013d493f05f2c606a8651db8f8c0169a..86cae066fc91e9d2bb74c6cc24e2c22434214910 100644 (file)
@@ -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]))