[Haskell] for large x, log (x::Integer) :: Double

Dylan Thurston dpt at lotus.bostoncoop.net
Tue Jul 13 05:22:44 EDT 2004


On Tue, Jul 13, 2004 at 05:01:32PM +0800, Dylan Thurston wrote:
> > This library will let you use a shift instead of a division,
> > but won't give you a constant time size function for Integers.
> 
> You can easily get a logarithmic time size function from the shift.
> But did you see Data.Bits.bitsize?

My mistake, bitSize is not useful for this purpose.

Peace,
	Dylan

-------------- 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/attachments/20040713/184399dc/attachment.bin


More information about the Haskell mailing list