Fix exact-integer-sqrt.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This commit is contained in:
parent
0a4ea0704d
commit
95cf997b9f
|
@ -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