in reply to convert output from exponentional notation to normal
In your case, I would probably also round numbers, since I have rarely seen the need for more the 3 significant figures for output outside of scientific computing. So my go to format here would probably "%.3g" for easy digestion, though %.8f is what meets your spec...
printf "%.8f\n", $counts / $total;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|