[GHC] #5166: Wrong calculation with Int64

GHC cvs-ghc at haskell.org
Mon May 2 04:17:17 CEST 2011


#5166: Wrong calculation with Int64
-------------------------------+--------------------------------------------
    Reporter:  malphunction    |       Owner:                             
        Type:  bug             |      Status:  new                        
    Priority:  normal          |   Component:  Runtime System             
     Version:  6.12.3          |    Keywords:                             
    Testcase:                  |   Blockedby:                             
          Os:  Linux           |    Blocking:                             
Architecture:  x86_64 (amd64)  |     Failure:  Incorrect result at runtime
-------------------------------+--------------------------------------------
 Let's multiply 1524503639859200000 on 13:

 {{{
 $ ghci
 Prelude> import Data.Int
 Prelude Data.Int> 1524503639859200000 * 13
 19818547318169600000 -- that's OK!
 Prelude Data.Int> (1524503639859200000::Int64)*(13::Int64)
 1371803244460048384 -- FAIL!!!!!
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5166>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list