bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] gawk(v4.1.4) bug when printing inter 14367579420085991


From: arnold
Subject: Re: [bug-gawk] gawk(v4.1.4) bug when printing inter 14367579420085991
Date: Mon, 30 Jul 2018 01:22:54 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

Thank you for your note.

By default, gawk uses 64 bit double precision floating point numbers
for all its computations. The number you're using is outside the range
of what these values can represent.

Since you have a version of gawk with MPFR support included, you can
use these features to process numbers with greater range. See
https://www.gnu.org/software/gawk/manual/html_node/Arbitrary-Precision-Arithmetic.html#Arbitrary-Precision-Arithmetic

Thanks,

Arnold

欧璐纯 <address@hidden> wrote:

> Hi, gawk is a powerful tool and it helps me a lot. Recently I found a problem.
> When I use command (echo 14367579420085991 | gawk '{printf("%d\n", $1)}' ) or 
> (echo 14367579420085993 | gawk '{printf("%d\n", $1)}' ), I get 
> 14367579420085992 rather than 14367579420085991.
> I think it is a bug. The version information is 'GNU Awk 4.1.4, API: 1.1 (GNU 
> MPFR 4.0.1, GNU MP 6.1.2)'.
>
>
> Thanks for developing gawk.
>
>
> Luchun ou
>



reply via email to

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