https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79973
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- gcc computes the exact, correctly-rounded value, while at runtime you are using code from some library (probably glibc) that trades off some precision for speed. What would you like to happen? That gcc stops constant folding atanh? You can do that with -fno-builtin-atanh. Or that glibc computes the correctly rounded value? There are libraries out there that do that, but they are usually quite a bit slower...