Re: truncate/floor with logBase

Alastair Reid <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
Thorsten Stocksmeier <[email protected]> writes:

Main> floor (logBase 2 (fromInteger 32768)) -- should be == floor 15.0
> 14

Rounding error I suspect.

Prelude> logBase 2 (fromInteger 32768) - 15.0
-9.53674e-07

--
Alastair Reid                 [email protected]  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.