#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:17 ross]:
> It could be done by having abs minBound throw an exception (which seems
justifiable).
That sounds sensible, and would handle the result of
{{{
minBound `gcd` minBound :: Int
}}}
correctly, but we wouldn't want to get an exception from taking `abs` of
the arguments in
{{{
minBound `gcd` (minBound `div` 2) :: Int
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3304#comment:18>
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