rem function in ghci changes result when using the Int type
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
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.4.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |