3 ms·
One trick I came up with recently: I found myself needing to add up a column of numbers, but there were so many that I started losing precision to awk's use of
by EvilTerran 8y ago
One trick I came up with recently: I found myself needing to add up a column of numbers, but there were so many that I started losing precision to awk's use of floats for all numbers. I wound up augmenting with `dc`[0] - something like (borrowing your example, and working from memory):
awk '
BEGIN { print "0" }
$4 > 3 { print $3"+p" }
' | dc
[0] https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc....