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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |wrong-code
     Ever confirmed|0                           |1
          Component|target                      |middle-end
            Summary|long double precision is    |long double sqrtl constant
                   |wrong in ARM 64             |folding is wrong
   Last reconfirmed|                            |2022-10-24

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---

Hmm, this might be a bug in mpfr though.  GCC uses MPFR to do constant folding.


Without constant folding libm produces:
1.4142135623730950488

That is:
```
#include <stdio.h>
#include <math.h>
int main(void) { volatile long double a = 2.0L; printf("%.20Lg \n",sqrtl(a)); }
```

Reply via email to