GHCI segfault on Double math

Ron Alford ronwalf at
Fri Dec 7 21:33:01 CET 2012

I'm trying to see if this is reproducible, or it's just my machine.
I'm on a MacBook Pro (15-inch, Mid 2012), OS X 10.8.2, Haskell Platform
2012.4.0.0 (32 bit):

$ ghci
GHCi, version 7.4.2:  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> properFraction (-1.1 :: Float)
Prelude> properFraction (1.1 :: Double)
Prelude> properFraction (-1.1 :: Double)
(-1,Segmentation fault: 11

'ceiling' and other code that uses properFraction segfaults on negative
doubles, too.

Compiled code doesn't have this defect.  I'm going to try the 64 bit
version to see if it resolves this problem.

-Ron Alford
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list