public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/52593] New: Builtin sqrt on x86 is not correctly rounded
@ 2012-03-15  6:00 bugdal at aerifal dot cx
  2012-03-15  9:58 ` [Bug target/52593] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bugdal at aerifal dot cx @ 2012-03-15  6:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52593

             Bug #: 52593
           Summary: Builtin sqrt on x86 is not correctly rounded
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bugdal@aerifal.cx


The builtin sqrt() on x86 (i387) should be disabled except with -ffast-math
because it is not correctly rounded. For example, sqrt(0x1.fffffffffffffp-1)
yields 1 instead of 0x1.fffffffffffffp-1. Using -fno-builtin-sqrt will give the
correct value assuming your C library/libm is correctly rounded.

Unfortunately bugs like this seem endemic in gcc. I would really like to see
all dubious builtins and other dubious floating point optimizations disabled
except with -ffast-math until somebody takes the time to rigorously test them
and prove their correctness.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-03-10 22:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-15  6:00 [Bug target/52593] New: Builtin sqrt on x86 is not correctly rounded bugdal at aerifal dot cx
2012-03-15  9:58 ` [Bug target/52593] " rguenth at gcc dot gnu.org
2012-03-15 17:25 ` bugdal at aerifal dot cx
2012-03-15 20:21 ` dominiq at lps dot ens.fr
2012-03-16  2:24 ` bugdal at aerifal dot cx
2012-03-16 11:00 ` rguenth at gcc dot gnu.org
2012-03-16 14:49 ` bugdal at aerifal dot cx
2012-04-28 23:22 ` bugdal at aerifal dot cx
2012-04-29  0:17 ` joseph at codesourcery dot com
2012-04-29  1:22 ` bugdal at aerifal dot cx
2014-03-10 22:36 ` david.heidelberger at ixit dot cz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).