bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] option --non-decimal-data discard lowest 8 bits


From: Zhizhou Zhang
Subject: [bug-gawk] option --non-decimal-data discard lowest 8 bits
Date: Mon, 6 Feb 2017 13:48:47 +0800

Hi,

I'm using gawk 4.1.4. I found a problem with --non-decimal-data. It's
shown below:

$ cat a
0x1111222233334444
$ cat a | gawk --non-decimal-data '{printf( "0x%x\n", $0)}'
0x1111222233334400

As it is, the lowest 8 bits 0x44 is discarded. I had a glance over the
source code, It seems because of AWKNUM is float type, which reserved
some bits for exponent part.

#define AWKNUM  double

Is this a known issue? I'm not sure whether it is a bug, I hope I
haven't bothered you too much.

-- 
Regards,
Zhizhou



reply via email to

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