simplified double bit error test

This commit is contained in:
Jonathan Lamothe 2024-07-06 21:01:17 -04:00
parent 74b26de743
commit 8f6acc6b6b

View File

@ -80,15 +80,14 @@ singleBitErrors = map
doubleBitErrors :: [(String, Word16, Maybe Word16)]
doubleBitErrors =
[ ( \(bitA, bitB) -> let
mask = (1 `shiftL` bitA) .|. (1 `shiftL` bitB)
[ let
mask = (1 `shiftL` a) .|. (1 `shiftL` b)
code = withChkBits `xor` mask
in
( "bad bits " ++ show bitA ++ " & " ++ show bitB
( "bad bits " ++ show a ++ " & " ++ show b
, code
, Nothing
)
) (a, b)
| a <- [0..14]
, b <- [1..15]
, a < b