Fix for incorrect (gcd -2) => -2; should give 2.
authorNeil Jerram <neil@ossau.uklinux.net>
Wed, 17 Sep 2008 20:46:40 +0000 (21:46 +0100)
committerNeil Jerram <neil@ossau.uklinux.net>
Mon, 22 Sep 2008 20:21:20 +0000 (21:21 +0100)
commit1dd797921c950f0a4d396faa6d7326ec6928e771
tree74601a98f426ae788dfa69f46e47b5f3ff61a160
parentf8c01b6f683e9a7e6962a70703cdad1f76771319
Fix for incorrect (gcd -2) => -2; should give 2.

(reported by Bill Schottstaedt)

* libguile/numbers.c (scm_gcd): When only one arg given, use scm_abs
  to ensure that result is non-negative.

* test-suite/tests/numbers.test ("gcd"): New test, (gcd -2).
NEWS
libguile/numbers.c
test-suite/tests/numbers.test