bug-coreutils
[Top][All Lists]
Advanced

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

Re: FAIL: df/total-awk.log


From: Jim Meyering
Subject: Re: FAIL: df/total-awk.log
Date: Sat, 11 Oct 2008 13:21:23 +0200

Philip Rowlands <address@hidden> wrote:
> I get the same results as Jim, even though on my system (Ubuntu Hardy)
> both gawk and mawk docs state OFMT defaults to "%.6g".
>
> I can't tell why OFMT is being ignored here by gawk - although I found
> a bug-gnu-utils post suggesting a difference between printing integers
> vs floating-point, this can't be right:
>
> $ gawk --version
> GNU Awk 3.1.6
> $ gawk 'BEGIN {print 2607560285.99}'
> 2.60756e+09
> $ gawk 'BEGIN {print 2607560286.00}'
> 2607560286
> $ gawk 'BEGIN {print 2607560286.01}'
> 2.60756e+09

Hi Phil,

I confirmed that using mawk is a problem by running
"make -C tests check TESTS=df/total-awk AWK=mawk"
on a system with 1.4T of space.  I get this difference,

--- out1        2008-10-11 13:13:40.000000000 +0200
+++ out2        2008-10-11 13:13:40.000000000 +0200
@@ -1,3 +1,3 @@
-2147483647
+2905220074
 1254884328
 1648269068

which confirms that mawk is limited to 32-bit integers.
So I'm ready to give up on using awk here.

A rewrite in Perl would be most welcome.




reply via email to

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