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

 I was half right: rather than being missing, another piece of the OS X 64
 bit linker was just sketched in.  This code incorrectly calculated some of
 the less common relocations.  The fix was just to replace the erroneous
 code with a call to `relocateAddress`.

 Here's what happens now:
 {{{
 gwright-macbook> inplace/bin/ghc-stage2 --interactive
 GHCi, version 7.0.1.20101221: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package ffi-1.0 ... linking ... done.
 Prelude> -1.0
 --1.0
 Prelude>
 }}}

 I don't yet understand the double minus sign in the result.  It's probably
 caused by the messing about I did with `Float.lhs` when trying to track
 down the bug.  I hope there isn't another real bug here, but you never
 know.

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