[Bug middle-end/107370] long double sqrtl constant folding is wrong

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 24 20:00:02 GMT 2022


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

--- Comment #8 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Mon, 24 Oct 2022, jacob at jacob dot remcomp.fr via Gcc-bugs wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107370
> 
> --- Comment #3 from jacob navia <jacob at jacob dot remcomp.fr> ---
>   1 trunk gcc:
>   2 .LC1:
>   3        .word   325511829  # 0x1366EA95 <<<--- SHOULD BE 325508205
>   4        .word   -922176773 # 0xC908B2FB OK
>   5        .word   -429395012 # 0xE667F3BC OK
>   6        .word   1073703433 # 0x3FFF6A09 OK
> 
> This data is wrong, I repeat, the first number (line 3) should be 325508205 or 
> 0x1366DC6D.

Why do you think that number is wrong?  If I compute the square root of 
2**225 using GMP (so not involving MPFR at all, just integer square root 
in GMP), I get 1366ea95 as the low 32 bits (and the next bit is a 0, so 
rounding toward 0 is correct in this case).


More information about the Gcc-bugs mailing list