This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52593] Builtin sqrt on x86 is not correctly rounded
- From: "bugdal at aerifal dot cx" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 28 Apr 2012 23:21:51 +0000
- Subject: [Bug target/52593] Builtin sqrt on x86 is not correctly rounded
- Auto-submitted: auto-generated
- References: <bug-52593-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52593
--- Comment #7 from Rich Felker <bugdal at aerifal dot cx> 2012-04-28 23:21:51 UTC ---
This bug seems to have been fixed with the addition of the
-fexcess-precision=standard feature, which is now set by default with -std=c99
or c11, and which disables the builtin sqrt based on 387 fsqrt. So apparently
it had already been fixed at the time I reported this, but I was unaware of the
right options to enable the fix and did not even think to try just using
-std=c99.
Note that for buggy libm (including glibc's), the fact that gcc has fixed the
issue will not fix the incorrect results, since the code in libm makes exactly
the same mistake gcc was making. But at least it's possible to fix it there.