Onno Garms <[EMAIL PROTECTED]> wrote:
> Regardless of any rounding errors, a/b should always return
> the same value, shouldn't it?

Not necessarily. Especially on Intel it makes a difference whether
everything happens within the FPU (80bit IIRC) or whether some result or
intermediate result is stored outside (64bit).

Never, ever, trust floating point arithmetic.

Andre'

PS: Check out the -ffloat-store compiler option.
[Floating point arithmetic is perfectly well defined, but the rules are
different from fixed point, and as you note, intermediate precision
matters a lot. -John]

_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to