[GHC] #3304: define gcd 0 0 = 0
GHC
cvs-ghc at haskell.org
Mon May 30 07:42:09 CEST 2011
#3304: define gcd 0 0 = 0
-----------------------------+----------------------------------------------
Reporter: stevec | Owner:
Type: proposal | Status: patch
Priority: normal | Milestone: 7.2.1
Component: libraries/base | Version: 7.1
Resolution: | Keywords:
Testcase: | Blockedby:
Difficulty: Unknown | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
-----------------------------+----------------------------------------------
Changes (by daniel.is.fischer):
* version: 6.10.3 => 7.1
Comment:
The last patch isn't directly related to the proposal, but since it came
up in the thread, I'm attaching it here nevertheless. It changes the
behaviour to match the docs more closely. With signed bounded integer
types, many results of `gcd` are negative if one of the arguments is
`minBound`, calling a final `abs` eliminates those except if the result is
`minBound`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3304#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list