This behaviour normal and while annoying, it is simply how things work
in the digital world, you will have to work around it.
Daniël
oh yes, this is one of the possible workarounds:
function is_equal_dbl(a ,b : double ) : boolean;
const
epsilon = 1e-14;
begin
result:=Abs(a - b ) < epsilon;
end;
It's just one more funny thing one must realize,
when comparing real numbers with some exact
real constants. After this, I will try to never
compare doubles directly, but using tricks like
above. Because, in this digital world
1 + 0.4 - 0.4 <> 1.
Milano
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal