Fix for incorrect (gcd -2) => -2; should give 2.
[bpt/guile.git] / libguile / numbers.c
index 7a4d619..52dfb73 100644 (file)
@@ -1022,7 +1022,7 @@ SCM
 scm_gcd (SCM x, SCM y)
 {
   if (SCM_UNBNDP (y))
-    return SCM_UNBNDP (x) ? SCM_INUM0 : x;
+    return SCM_UNBNDP (x) ? SCM_INUM0 : scm_abs (x);
   
   if (SCM_I_INUMP (x))
     {