Merge pull request #217 from omasanori/exact-integer-sqrt
Fix exact-integer-sqrt.
This commit is contained in:
commit
92e0961bb7
|
@ -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?
|
||||||
|
|
Loading…
Reference in New Issue