From f30e7da2145a7d7f3e405306c4cda5a370e8bed3 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Tue, 4 May 2010 15:08:28 +0000
Subject: [PATCH] Fix gcd bug:  (gcd 20286123923750474264166990598656
 680564733841876926926749214863536422912) -> -512 instead of 512.

(From sbcl.)
---
 code/bignum.lisp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/code/bignum.lisp b/code/bignum.lisp
index 1ba99c74a..b66007d1c 100644
--- a/code/bignum.lisp
+++ b/code/bignum.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bignum.lisp,v 1.50 2010/04/20 17:57:43 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bignum.lisp,v 1.51 2010/05/04 15:08:28 rtoy Rel $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1277,6 +1277,7 @@ down to individual words.")
 	(rotatef u v)	
 	(rotatef u-len v-len))
       (setf u (copy-bignum u u-len))
+      (bignum-abs-buffer u u-len)
       (let ((n (bignum-mod-gcd v1 u)))	
 	(ash (bignum-mod-gcd u1 (if (fixnump n)
 				    (make-small-bignum n)
-- 
GitLab