Fwd: integer-sqrt problem in R7RS-small spec

Skip to first unread message

John Cowan

Jun 26, 2022, 10:01:42 AM6/26/22
to scheme-re...@googlegroups.com
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.


Bradley Lucier

Jun 26, 2022, 11:51:29 AM6/26/22
to scheme-re...@googlegroups.com, John Cowan, luc...@purdue.edu
Good idea. Brad
> --
> You received this message because you are subscribed to the Google
> Groups "scheme-reports-wg1" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to scheme-reports-...@googlegroups.com
> <mailto:scheme-reports-...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/scheme-reports-wg1/CAD2gp_TEbpksCxaMhyBFGhPj21_i9J3Hkw9xZ0NWyQJp1_LR0A%40mail.gmail.com
> <https://groups.google.com/d/msgid/scheme-reports-wg1/CAD2gp_TEbpksCxaMhyBFGhPj21_i9J3Hkw9xZ0NWyQJp1_LR0A%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
0 new messages