#3033: numerical error introduced by -O1
-----------------------------+----------------------------------------------
Reporter:  roland            |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.10.1            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 {{{
 f x = x * 1000000.1

 g y True  = y
 g y False = g y True

 z = let x = 100000000000.0 in
     f x - g (f x) True

 main = putStrLn (show z)
 }}}

 This program prints "-2.328125" when compiled with "-O1".
 Running {{{main}}} from within ghci gives "0.0", as it should.

 Occurs under Mac OS and Linux (both x86).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3033>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to