bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] big number calculation


From: Chen Feng
Subject: [bug-gawk] big number calculation
Date: Mon, 6 Aug 2012 14:05:33 +0800

Hi there;

I've encountered such problem:

awk 'BEGIN{
        print 2**56;
        print 72057594037927936 + 85;
}'

the result should be:
72057594037927936
72057594037928021

but unfortunately the actual result is:
72057594037927936
72057594037928016

I think there could be something wrong with the big number calculation in GNU-Awk.


--
Thanks,
Chen
[ address@hidden ]

reply via email to

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