#7365: rem function in ghci changes result when using the Int type
-----------------------------------------+----------------------------------
Reporter: leonardo | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 7.4.1 | Keywords:
Os: Windows | Architecture: x86
Failure: Incorrect result at runtime | Testcase:
Blockedby: | Blocking:
Related: |
-----------------------------------------+----------------------------------
I define this function
{{{
congruent_modulo_n a b n = (rem a n) == (rem b n)
}}}
If the signature is:
{{{
congruent_modulo_n :: Integer->Integer->Integer->Bool
}}}
Then when I try this function in the ghci everything works perfect.
If I use this signature:
{{{
congruent_modulo_n :: Int->Int->Int->Bool
}}}
Then for the following input I get False:
{{{
congruent_modulo_n (3^(113-1)) 1 113
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7365>
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