I think this should become an erratum right away -- I see no reason not to do it.
---------- Forwarded message ---------
From:
Marc Feeley <fee...@iro.umontreal.ca>Date: Sun, Jun 26, 2022 at 9:25 AM
Subject: integer-sqrt problem in R7RS-small spec
To: John Cowan <
co...@ccil.org>
Hi John. I just noticed this bug in section 5.3.3 of R7RS-small:
(define-values (x y) (integer-sqrt 17))
(list x y) => (4 1)
The correct code should be calling the procedure exact-integer-sqrt .
Amusingly, Gambit defines integer-sqrt as a predefined procedure which returns a single result, so I couldn’t understand what was going on when testing this.
Marc