[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Bug in gawk big num
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] Bug in gawk big num |
Date: |
Wed, 26 Sep 2018 09:46:39 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Sep 26, 2018 at 09:40:49AM -0400, Andrew J. Schorr wrote:
> I think the bug is in mpfr.c:mpg_maybe_float in this section:
>
> for (; *s != '\0'; s++) {
> if (*s == dec_point || *s == 'e' || *s == 'E')
> return true;
> }
>
> If the hex string contains the letter 'E', it decides that it might be a
> floating point number and ends up calling mpfr_strtofr instead
> of mpg_strtoui.
The attached patch seems to work, but I'm not sure whether this is
the ideal fix.
Arnold -- please take a look.
Regards,
Andy
mpfr.patch
Description: Text document
Re: [bug-gawk] Bug in gawk big num, arnold, 2018/09/26
Re: [bug-gawk] Bug in gawk big num, arnold, 2018/09/27