Merge pull request #217 from omasanori/exact-integer-sqrt

Fix exact-integer-sqrt.
This commit is contained in:
Yuichi Nishiwaki 2014-09-20 20:31:57 +09:00
commit 92e0961bb7
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@
(* x x)) (* x x))
(define (exact-integer-sqrt k) (define (exact-integer-sqrt k)
(let ((s (exact (sqrt k)))) (let ((s (exact (floor (sqrt k)))))
(values s (- k (square s))))) (values s (- k (square s)))))
(export number? (export number?