This is classic floating point rounding/truncation symptom. The two values are calculated in different ways so end up being rounded/truncated differently and become very slightly different values. You could fix it by storing cents rather than dollars (integers rather than floats).
In reply to Re: subtraction not working right
by GrandFather
in thread subtraction not working right
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |