[GHC] #8702: floor, ceiling, truncate and so on… on NaN fail

#8702: floor, ceiling, truncate and so on… on NaN fail -------------------------+------------------------------------------------- Reporter: | Owner: skypers | Status: new Type: bug | Milestone: _|_ Priority: high | Version: 7.4.1 Component: | Operating System: Linux libraries/base | Type of failure: Incorrect result at runtime Keywords: | Test Case: let nan = 0 / 0 in floor nan Architecture: | Blocking: x86_64 (amd64) | Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- Those functions returns a total random value when given NaN. This is not an acceptable behavior I guess, and we might inquire on what to do. For instance: {{{ let nan = 0 / 0 in floor nan }}} result: {{{ -269653970229347386159395778618353710042696546841345985910145121736599013708251444699062715983611304031680170819807090036488184653221624933739271145959211186566651840137298227914453329401869141179179624428127508653257226023513694322210869665811240855745025766026879447359920868907719574457253034494436336205824 }}} Maybe an arithmetic exception would be a better behavior? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8702 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8702: floor, ceiling, truncate and so on… on NaN fail -------------------------------------------------+------------------------- Reporter: skypers | Owner: Type: bug | Status: Priority: high | closed Component: libraries/base | Milestone: _|_ Resolution: duplicate | Version: 7.4.1 Operating System: Linux | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: let nan = 0 / 0 in floor nan | x86_64 (amd64) Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: 3070 -------------------------------------------------+------------------------- Changes (by jstolarek): * status: new => closed * resolution: => duplicate * related: => 3070 Comment: Duplicate of #3070. Closing. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8702#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC