- marked as enhancement
Implement 'exact-integer-sqrt' in scheme
Issue #99
new
exact-integer-sqrt should return two nonnegative exact integers s and r where n = s2 + r and n < (s + 1)2.
( http://www.scheme.com/tspl4/objects.html#./objects:s128 )
For example, this should return 4 3
(exact-integer-sqrt 19)
Traceback (most recent call last):
File "stdin", line 1, col 2
RunTimeError: unbound variable 'exact-integer-sqrt'
Comments (1)
-
- Log in to comment