Delphi Math: Why is 0.7<0.70?

Posted by Al C on Stack Overflow See other posts from Stack Overflow or by Al C
Published on 2010-05-02T17:13:15Z Indexed on 2010/05/02 17:17 UTC
Read the original article Hit count: 237

Filed under:
|
|
|

If I have variables a, b, an c of type double, let c:=a/b, and give a and b values of 7 and 10, then c's value of 0.7 registers as being LESS THAN 0.70.

On the other hand, if the variables are all type extended, then c's value of 0.7 does not register as being less than 0.70.

This seems strange. What information am I missing?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about variables