
#15271: 1e1000000000 :: Double yields 0.0 instead of Infinity -------------------------------------+------------------------------------- Reporter: claude | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by fangyizhou): I found the issue. In `rtsPrimFloat.c`, a `StgInt` is passed as an argument to `ldexp`, which expects an `int` for the argument. On platforms where `StgInt` is 64-bit and `int` is 32-bit wraparound behaviour will be observed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15271#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler