Op Mon, 29 Oct 2007, schreef L:
> > 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.
>
> My opinion:
> This is ludicrous.
>
> The end user is using a high level language and should not care whether the
> computer is digital or analog.
>
> For example, my calculator subtracts 0.4 just fine, and it is digital!
Your Casio doesn't do comparisons. Just round to 10 digits before you
compare and it'll work just as fine as on your Casio.
Daniël
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal