From: Michael Nolan Date: Thu, 6 Feb 2020 02:11:25 +0000 (-0500) Subject: Fix test_partsig's invalid result for the equals test X-Git-Tag: ls180-24jan2020~259 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6497441bb14cd70731858b82a80c753fd538856d;p=ieee754fpu.git Fix test_partsig's invalid result for the equals test --- diff --git a/src/ieee754/part/test/test_partsig.py b/src/ieee754/part/test/test_partsig.py index 29a26faa..4b46e1ce 100644 --- a/src/ieee754/part/test/test_partsig.py +++ b/src/ieee754/part/test/test_partsig.py @@ -102,7 +102,8 @@ class TestPartitionPoints(unittest.TestCase): # do the partitioned tests for i, mask in enumerate(mask_list): if (a & mask) == (b & mask): - y |= maskbit_list[i] + # OR y with the lowest set bit in the mask + y |= (maskbit_list[i] & ~(maskbit_list[i]-1)) # check the result outval = (yield module.eq_output) msg = f"{msg_prefix}: 0x{a:X} == 0x{b:X}" + \