Haskell Bit Multiplication
jduey opened this issue · comments
Jim Duey commented
In the Haskell bit mult. sample code, incrementing a b1 produces a 0 instead of the expected 2.
I put this in the main
print $ toU32 (inc (b1 end))
and it prints '0' to the console. Putting
print $ toU32 (inc (b1 (b0 end)))
and it prints '2' as expected. Please forgive the parens. I'm a Lisp programmer. :)
Victor Taelin commented
This version of inc
words mod 2^bit_size
. There is another version that would allow extending the bitstring, but it doesn't fuse IIRC