It all comes back to how the computer actually stores and processes numbers. Floating point numbers are by nature inexact. If you need exact you need to use integer math and then correct for decimal places. See Bug? 1+1 != 2, Filthy Floats or the IEEE stuff here including What Every Computer Scientist Should Know about Floating-Point Arithmetic
If you don't really care to much just use printf/sprintf
printf '%.6f', 1062676995.614963 - 1062676995.594934 __DATA__ 0.020029
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Simple math gone wrong
by tachyon
in thread Simple math gone wrong
by sdyates
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |