Re: Bug in srfi-48?

Donald Allen <[email protected]> Thu, 12 Oct 2017 09:04:46 -0400
Newsgroups gmane.lisp.scheme.srfi.srfi-48
Message-ID <CAPsTYbyU4ifnU+MOVqJY0SYsk6osbpKW+YtC8iO-FSwVGP2ofg@mail.gmail.com>
Arthur --

Thanks for the quick response. From your description of the patch, it
sounds like you addressed the error that occurs using Gambit. But did
you also have a look at the odd rounding behavior I reported in my
first message?

/Don

On 11 October 2017 at 17:32, Arthur A. Gleckler <[email protected]> wrote:
> On Wed, Oct 11, 2017 at 1:36 PM, Donald Allen <[email protected]>
> wrote:
>
>>
>> Maybe this will help:
>
>
> Thanks.  I tried your examples in both Gambit and Guile.  They worked fine
> in Guile, but in Gambit, I got the same results you did.  It turns out th=
at
> this is because number->string in Gambit doesn't prefix numbers whose
> absolute value is less than one with a zero, i.e. it produces ".997" inst=
ead
> of "0.997".  However, compose-with-digits assumes the latter.
>
> I've attached a fix for this bug.  Note that I have not checked for this
> problem on all code paths.
>
> I've included Ken Dickey, the author of SRFI 48, among the recipients in
> case he would like to comment =E2=80=94 or approve of my applying the pat=
ch to the
> public implementation as an erratum.
>
> For reference, here's the archive of the discussion so far:
>
>   https://srfi-email.schemers.org/srfi-48/dates/2017/10
>
> Thanks.