https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79720
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Thomas Koenig from comment #12) > (In reply to Jakub Jelinek from comment #11) > > > Yeah, exactly. But then this is really NOTABUG. The compile time > > evaluation needs to be .5ulp precise, not emulate whatever precision issues > > the library has. > > When -fcx-fortran-rules is active(by default in Fortran, > or when explicitly specified by the user) we generate inline > code. The issue is the same then. But the bug is likely still in the generated inline code, not in the constant folding which uses mpfr/libmpc and should be 0.5ulp precise. And both the generated inline code and library is a compromise between speed and precision, I think for most of the complex math functions glibc doesn't guarantee 0.5ulp precision even for double (unlike for many scalar math functions), for 0.5ulp we'd most likely need a library implementation that would deal with the problematic cases. Closing as invalid.