bug-gawk
[Top][All Lists]
Advanced

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

Re: pos-pi or neg-pi ??


From: arnold
Subject: Re: pos-pi or neg-pi ??
Date: Thu, 28 Apr 2022 02:13:16 -0600
User-agent: Heirloom mailx 12.5 7/5/10

"Andrew J. Schorr" <aschorr@telemetry-investments.com> wrote:

> Hi,
>
> Just curious -- why do you say that this relates to uninitialized variables?
> I see the same after initializing a to 0:
>
> bash-4.2$ ./gawk 'BEGIN { printf("%f\n", -a) }'
> -0.000000
> bash-4.2$ ./gawk -va=0 'BEGIN { printf("%f\n", -a) }'
> -0.000000
> bash-4.2$ ./gawk 'BEGIN { a = 0; printf("%f\n", -a) }'
> -0.000000
>
> And:
> bash-4.2$ ./gawk 'BEGIN { printf("%f\n", -0) }'
> -0.000000

You're right. I misspoke. The problem was only in MPFR mode.

In any case, I just posted a fix.

Thanks,

Arnold



reply via email to

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