[Haskell-cafe] segfault on fromIntegral (floor $ sqrt (-123.123)) == -123.123

Erik Rantapaa erantapaa at gmail.com
Mon Feb 24 19:46:35 UTC 2014

I'm getting a segfault on this expression entered into ghci:

GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> fromIntegral (floor $ sqrt (-123.123)) == -123.123
Segmentation fault: 11

I'm running the 32-bit version of the Haskell Platform on OSX.

Is this a bug? a problem with my setup? "Just don't take square roots of
negative numbers - you should know better!"???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140224/0cefcab8/attachment.html>

More information about the Haskell-Cafe mailing list