bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Bug in gawk big num


From: arnold
Subject: Re: [bug-gawk] Bug in gawk big num
Date: Wed, 26 Sep 2018 07:50:26 -0600
User-agent: Heirloom mailx 12.4 7/29/08

"Andrew J. Schorr" <address@hidden> wrote:

> So this leaves the question of why strtonum does not work as expected.
> I guess there may be a bug in mpfr.c:do_mpfr_strtonum, but don't have time
> to dig deeper right now...

It's a matter of setting PREC big enough when using --bignum. Using the
example of 0x361037073401E5313436BA5C23513A12311BDEF111DDDAFC I had
to set PREC up to like 200 to get the correct result.

Once again, even with --bignum, gawk does not automatically do
infinite precision arithmetic. For that, use bc or dc.

Thanks,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]