simplified double bit error test
This commit is contained in:
parent
74b26de743
commit
8f6acc6b6b
|
@ -80,15 +80,14 @@ singleBitErrors = map
|
||||||
|
|
||||||
doubleBitErrors :: [(String, Word16, Maybe Word16)]
|
doubleBitErrors :: [(String, Word16, Maybe Word16)]
|
||||||
doubleBitErrors =
|
doubleBitErrors =
|
||||||
[ ( \(bitA, bitB) -> let
|
[ let
|
||||||
mask = (1 `shiftL` bitA) .|. (1 `shiftL` bitB)
|
mask = (1 `shiftL` a) .|. (1 `shiftL` b)
|
||||||
code = withChkBits `xor` mask
|
code = withChkBits `xor` mask
|
||||||
in
|
in
|
||||||
( "bad bits " ++ show bitA ++ " & " ++ show bitB
|
( "bad bits " ++ show a ++ " & " ++ show b
|
||||||
, code
|
, code
|
||||||
, Nothing
|
, Nothing
|
||||||
)
|
)
|
||||||
) (a, b)
|
|
||||||
| a <- [0..14]
|
| a <- [0..14]
|
||||||
, b <- [1..15]
|
, b <- [1..15]
|
||||||
, a < b
|
, a < b
|
||||||
|
|
Loading…
Reference in New Issue
Block a user