simple calc, bad result



I have a few doubles that are returning a strange value. In plain english, this is what is being done:

val1 = 0.1062
val2 = 0.1061
diff = val1 - val2

I would expect to get diff = 0.0001

Instead, I am getting diff = 5.76392e-005

* setprecision(4) is being used on diff
Topic archived. No new replies allowed.