#4867: ghci displays negative floats incorrectly (was: Incorrect result from trig functions) -------------------------------+-------------------------------------------- Reporter: gwright | Owner: gwright Type: bug | Status: new Priority: high | Milestone: 7.0.2 Component: GHCi | Version: 7.0.1 Keywords: | Testcase: Blockedby: | Difficulty: Os: MacOS X | Blocking: Architecture: x86_64 (amd64) | Failure: Incorrect result at runtime -------------------------------+--------------------------------------------
Comment(by altaic): Agreed. I'm going to have another look at `Linker.c`. Optimizations appear to effect the bug quite a bit. The double '-' happened for me with the "devel2" BuildFlavour. With "quickest" BuildFlavour (no optimizations) I get the following output from GHCi: {{{ Prelude> -1.0 :: Float -1.0 Prelude> -1.0 :: Double 1.0000000000000253 Prelude> (-1.0 :: Double) + (1.0 :: Double) 2.0000000000000253 }}} So it's not just the failed negation of `x` in `showSignedFloat`; it seems that other negations are failing as well, which is unsurprising. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4867#comment:42> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs