Am 22.08.2017 00:02 schrieb "James Richters" <ja...@productionautomation.net
>:

The others already wrote about floating point precision, so I won't repeat
that.

> The reason I noticed this is because I have some conditional statements
like
> If Draw_GX_Min<>99.999 then
>     Something....

*DON'T* compare floating point numbers like that. Instead use SameValue()
from the Math unit which has an additional epsilon value (with a default
value) that defines a lower and upper bound from your desired value to
compare to.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to