Re: [GHC] #867: Integer arithmetic gives the wrong answer on amd64/Linux
#867: Integer arithmetic gives the wrong answer on amd64/Linux ---+ Reporter: igloo | Owner: Type: bug | Status: closed Priority: normal| Milestone: Component: Compiler |Version: 6.4.1 Severity: normal| Resolution: fixed Keywords:| Os: Linux Difficulty: Unknown | Architecture: x86_64 (amd64) ---+ Changes (by igloo): * resolution: = fixed * status: new = closed Comment: Fixed by: {{{ Thu Sep 28 01:48:06 BST 2006 Ian Lynagh [EMAIL PROTECTED] * Fix mulIntMayOflo on 64-bit arches; fixes trac #867 We were assuming we could multiply 2 32-bit numbers without overflowing a 64-bit number, but we can't as the top bit is the sign bit. }}} Test is arith019. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/867 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
[GHC] #867: Integer arithmetic gives the wrong answer on amd64/Linux
#867: Integer arithmetic gives the wrong answer on amd64/Linux ---+ Reporter: igloo |Owner: Type: bug | Status: new Priority: normal |Milestone: Component: Compiler| Version: 6.4.1 Severity: normal | Keywords: Os: Linux | Difficulty: Unknown Architecture: x86_64 (amd64) | ---+ On x86 I get: {{{ Prelude reverse $ take 10 $ reverse $ show $ sum [ x ^ x | x - [1..1000] ] 9110846700 }}} which is correct, but on amd64/Linux I get: {{{ Prelude reverse $ take 10 $ reverse $ show $ sum [ x ^ x | x - [1..1000] ] 0612504812 }}} Both ghci's above are 6.4.1, but I also see it with the HEAD (a few days old). Seen on Debian, Gentoo and rpath distributions. Thanks Ian -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/867 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
Re: [GHC] #867: Integer arithmetic gives the wrong answer on amd64/Linux
#867: Integer arithmetic gives the wrong answer on amd64/Linux ---+ Reporter: igloo | Owner: Type: bug | Status: new Priority: normal| Milestone: Component: Compiler |Version: 6.4.1 Severity: normal| Resolution: Keywords:| Os: Linux Difficulty: Unknown | Architecture: x86_64 (amd64) ---+ Comment (by duncan): I get the same results with ghc-6.4.2 and ghc-6.5.20060724 on my amd64 box. It's fine in hugs on the amd64 and fine with ghc-6.4.2 on my sparc box. On both boxes I'm using gmp-4.1.4 (gentoo revision 3). -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/867 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