https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79720

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[6/7 Regression] complex    |[5/6/7 Regression] complex
                   |division different at       |division different at
                   |compile time / runtime      |compile time / runtime

--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---


(In reply to Dominique d'Humieres from comment #6)

> IMO this PR should be closed as invalid: the assumption that the roundoff
> errors don't depend on the optimization level is wrong.

There are very many optimizations that we do not do in order
not to change floating point results from what the user wrote.

For example, the flag -freciprocal-math to control if x / y
can be replaced by x * (1 / y).  This can lose you around one to
two ULP, same as we have here.

We also do a quite complex (sorry for the pun) and expensive
division routine, just in order not to lose any bits of precision.
If the compile-time simplification does not match that, it is
simply buggy.

Reply via email to