[Haskell-cafe] Looking for smallest power of 2 >= Integer

Stefan O'Rear stefanor at cox.net
Mon Dec 3 23:44:33 EST 2007


On Mon, Dec 03, 2007 at 11:40:14PM -0500, Brandon S. Allbery KF8NH wrote:
>
> On Dec 3, 2007, at 23:36 , Dan Piponi wrote:
>
>> Is there anything in any of the interfaces to Integer that will allow
>> me to quickly find the highest bit set in an Integer? If not, does
>
> Isn't Integer unlimited (well, limited by RAM)?

Any *specific* integer has a finite number of 1-bits.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20071203/f75ef54d/attachment.bin


More information about the Haskell-Cafe mailing list