Re: Bug in srfi-48? Donald Allen 12 Oct 2017 13:04 UTC

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 <xxxxxx@speechcode.com> wrote:
> On Wed, Oct 11, 2017 at 1:36 PM, Donald Allen <xxxxxx@gmail.com>
> 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 that
> 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" instead
> 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 — or approve of my applying the patch 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.