[bugfix] exact-integer-sqrt was broken
This commit is contained in:
parent
acd70f108d
commit
11c0d78957
|
@ -376,7 +376,7 @@
|
|||
(import (scheme inexact))
|
||||
|
||||
(define (exact-integer-sqrt k)
|
||||
(let ((n (exact (sqrt k))))
|
||||
(let ((n (exact (floor (sqrt k)))))
|
||||
(values n (- k (square n)))))
|
||||
|
||||
(define (gcd n m)
|
||||
|
|
Loading…
Reference in New Issue