http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57994
--- Comment #20 from Paolo Carlini <paolo.carlini at oracle dot com> --- Thus I clearly realize something: if we do better for mpfr, the issue remains that if we do *not* optimize and constants are not propagated, we issue library calls, which, for command line switches like -fno-math-errno -funsafe-math-optimizations give incorrect nan result. In other terms, I'm still more than willing to work on mpfr-related improvements, but I'm still not convinced that when constants are not at issue we are really ok with those nans... Note again, in case isn't clear already, that for this kind of snippet I never managed to see nans with clang/icc. About mpfr, I would appreciate feedback that I'm on the right track. Thanks!