#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 igloo):
Replying to [comment:21 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.
Good point. Fixed in changeset:9b02e90c860f41c6431e6a0015ea4f02ec770ced.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3304#comment:23>
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