#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):

 Hmm, that's odd... Perhaps someone with better GHC-fu can figure out why
 these results are different:

 {{{
 Prelude GHC.Float> showsPrec 0 (-1.0 :: Double) ""
 "--1.0"
 Prelude GHC.Float> showSignedFloat showFloat 0 (-1.0 :: Double) ""
 "-1.0"
 }}}

 Given that in `Float.lhs`:
 {{{
 instance  Show Double  where
     showsPrec   x = showSignedFloat showFloat x
     showList = showList__ (showsPrec 0)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4867#comment:31>
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

Reply via email to