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

Howard Oakley hoakley at btconnect.com
Wed Jun 30 15:08:39 EDT 2004

On 30/6/04 19:56, Howard Oakley wrote:

> - if the original number is an integer, the string length gives you the
> exponent, which in log10 forms the integer part of the result

Well, almost. The string length is actually 1 greater than the integer part
of the result, as log10(1) = 0.0, and log10(10) = 1.0, if the dusty room at
the back of my mind is not deceiving me :-)


Dr Howard Oakley
The Works columnist for MacUser magazine (UK)

More information about the Haskell mailing list