[GHC] #3304: define gcd 0 0 = 0
GHC
cvs-ghc at haskell.org
Mon Jun 13 12:44:23 CEST 2011
#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 daniel.is.fischer):
I'd prefer wrapping to overflow for all of div, mod, quot, rem, but see
#1042, #2166, #3065 for why things are as they are. If #3065 is resolved
by changing the behaviour to wrapping,
{{{
gcd x y = abs (gcd' x y)
}}}
would be my choice.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3304#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list