
#7866: floor (0/0) :: Int is different with -O0 and -O1 ------------------------------------------------+-------------------------- Reporter: alang9 | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.2 Resolution: invalid | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result at runtime | (amd64) Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by bgamari): According the IEEE754-1985, Section 7.1 (as I don't have access to the latest version of the standard) attempting to convert an unrepresentable floating point value like should result in an invalid operation exception. The specification states that when there is no trap, the result should be NaN when floating point. The specification makes no statement on what should happen when there is no trap and the destination format is unable to represent NaN. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7866#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler