I know that storing a single value (or double) cannot be very accurate. therefore saving, for example, 125.12, can lead to 125.1200074788. now in delphi there is some useful function, such as valuevalue or comparevalue, which accept epsilon as param and say that 125.1200074788 or, for example, 125.1200087952 is equal.
but I often see things in codes like: if aSingleVar = 0, then ... and this actually, as I see it, always works. What for? why saving for example 0 in one var saves the exact value?
source
share