lcm should do abs

This commit is contained in:
Yuichi Nishiwaki 2014-09-09 02:24:19 +09:00
parent afe547f1c3
commit d2e5ca6985
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@
(define (lcm . args)
(define (lcm i j)
(/ (* i j) (gcd i j)))
(/ (abs (* i j)) (gcd i j)))
(let loop ((args args) (acc 1))
(if (null? args)
acc