[Haskell-cafe] Is logBase right?
Roberto
plastermoso at hotmail.com
Fri Aug 21 15:00:58 EDT 2009
Hi,
There is a mistake is logBase:
$ ghci
GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> logBase 10 10
1.0
Prelude> logBase 10 100
2.0
Prelude> logBase 10 1000
2.9999999999999996 <--- eeeerrgghhhh!
Prelude> logBase 10 10000
4.0
My host is a Debian GNU/Linux 5.0.2 (lenny) with the following GHC packages:
ii ghc6 6.10.4-1
ii ghc6-doc 6.10.4-1
ii libghc6-mtl-dev 1.1.0.2-7+b1
ii libghc6-utf8-string-dev 0.3.5-1+b1
ii libghc6-x11-dev 1.4.5-6
rc libghc6-x11-doc 1.4.2-1
ii libghc6-x11-xft-dev 0.3-3+b3
ii libghc6-xmonad-contrib-dev 0.8.1-3+b3
rc libghc6-xmonad-contrib-doc 0.8-2
ii libghc6-xmonad-dev 0.8.1-5
Regards!
More information about the Haskell-Cafe
mailing list