#5764: Double addition error
------------------------------------------+---------------------------------
  Reporter:  jimstutt                     |          Owner:         
      Type:  bug                          |         Status:  closed 
  Priority:  normal                       |      Milestone:         
 Component:  Compiler                     |        Version:  7.2.2  
Resolution:  invalid                      |       Keywords:         
        Os:  Unknown/Multiple             |   Architecture:  x86    
   Failure:  Incorrect result at runtime  |     Difficulty:  Unknown
  Testcase:                               |      Blockedby:         
  Blocking:                               |        Related:         
------------------------------------------+---------------------------------

Comment(by maeder):

 ghc is not stuck to IEEE (it only defaults to Double) but you can do

 {{{
 Prelude> 0.1 + 0.2 :: Rational
 3 % 10
 }}}

 The output is not printed nicely, but how should it print 1/3 as decimal?

 {{{
 Prelude> 1 / 3 :: Rational
 1 % 3
 }}}

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