cat T|awk -v format=$format '{ SUM += $1} END { printf format,SUM}'
the file T has below data
usghrt45tf:hrguat:/home/hrguat $ cat T
-1363000.00123456789
-95000.00789456123
-986000.0045612378
-594000.0015978
-368939.54159753258415
-310259.0578945612
-133197.37123456789
-12475383.16789456123
-2812276.0312345678
the output of above command is "-19138055.18514395505190" with format set to
format='%22.14f'
the actual result of the sum should be "-19138055.18514395762415"
It looks like the unix is approximating the last 6 digits in the scale. Could any one please help ?