[Haskell-beginners] Efficient Binary Multiplication
quentin.liu.0415 at gmail.com
Sat Apr 14 20:28:55 UTC 2018
Suppose I want to multiply two binary numbers whose representation uses lists (e.g. 14 is represented as [1, 1, 1, 0]). Is there any efficient way to do binary multiplication? The way I could come up with involves a lot of intermediate lists that will be discarded eventually and is extremely inefficient. I know one fast algorithm that uses Array but would it be possible to do the multiplication with only lists?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners