#3304: define gcd 0 0 = 0
-----------------------------+----------------------------------------------
Reporter: stevec | Owner:
Type: proposal | Status: closed
Priority: normal | Milestone: 7.2.1
Component: libraries/base | Version: 7.1
Resolution: fixed | Keywords:
Testcase: | Blockedby:
Difficulty: Unknown | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
-----------------------------+----------------------------------------------
Comment(by ross):
Replying to [comment:20 daniel.is.fischer]:
> I thought so, too, for a while, but when I tried that, I ran into gcd
minBound (-1), which throws the overflowError
because rem minBound (-1)::Int throws overflowError, but surely that's a
bug: quot minBound (-1)::Int should overflow, but rem minBound (-1)::Int
should be 0.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3304#comment:21>
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