[Haskell-cafe] bitSize

Brandon Allbery allbery.b at gmail.com
Mon Aug 29 10:44:42 CEST 2011

On Mon, Aug 29, 2011 at 04:32, Andrew Coppin <andrewcoppin at btinternet.com>wrote:

> OK. But since there's no way of getting a byte count for an Integer
> either...

The count depends on how you're serializing it; unless you are literally
serializing to individual bits and sending them over a synchronous serial
link, the correct answer is an integer logarithm by your word size + the
current definition of bitSize applied to said word.

brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110829/a7397446/attachment.htm>

More information about the Haskell-Cafe mailing list