dummy.txt has the following data
3 19108601157904265
when I am trying to do arithmetic calculations using the below command
awk '{ print $1, ($1-1) * $2 }' dummy.txt
I am getting the answer as
3 38217202315808528
But it should be
3 38217202315808530
Normal command line calculation gives me expected value.
>a=2
>b=19108601157904265
>echo $(( a * b ))
>38217202315808530
Not sure why I am getting a lesser value than the actual multiplication. Thanks in advance.
Solution given in the question "Printing long integers in awk" works if the gawk version is greater than 4.1 whereas my current current version of gawk is older one.