From 6497441bb14cd70731858b82a80c753fd538856d Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Wed, 5 Feb 2020 21:11:25 -0500 Subject: [PATCH] Fix test_partsig's invalid result for the equals test --- src/ieee754/part/test/test_partsig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}" + \ -- 2.30.2