public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Tim Prince <tprince@computer.org> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/6914: -O2 and -O give different results for the same valid FP code Date: Mon, 03 Jun 2002 06:36:00 -0000 [thread overview] Message-ID: <20020603133606.28728.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/6914; it has been noted by GNATS. From: Tim Prince <tprince@computer.org> To: veksler@il.ibm.com, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Cc: Subject: Re: c++/6914: -O2 and -O give different results for the same valid FP code Date: Mon, 3 Jun 2002 06:30:53 -0700 On Monday 03 June 2002 06:09, Michael Veksler wrote: > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc& >pr=6914 > > So here are my conclusions (after reading the assembly, and running gdb > on it): > Floating point on x86 is done on 80 bit registers (IEEE's double > extended type). > GCC generates code to exploit all 80 bits during divide. It then spills > the result > to memory. > > The second divide is not spilled to memory, and the comparison is done > between truncated value (which lost accuracy), and a completely accurate > 80 bit > value. > According to http://www.validlab.com/goldberg/paper.ps this does not > seem right. > According to this paper, gcc should operate on double precision (64 > bit), or at > least give the impression that it does so (to the outside viewer). But > gcc operates > on a mixed 80/64 bit setting, and that seems contradictory to IEEE spirit > (and, probably, agains ISO C rules). > Among the remedies available would be a) set 53-bit rounding mode b) choose -msse2, for appropriate targets -- Tim Prince
next reply other threads:[~2002-06-03 13:36 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-06-03 6:36 Tim Prince [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-06-03 23:56 Michael Veksler 2002-06-03 9:26 Franz Sirl 2002-06-03 8:56 Michael Veksler 2002-06-03 6:16 Michael Veksler 2002-06-03 4:46 Michael Veksler
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020603133606.28728.qmail@sources.redhat.com \ --to=tprince@computer.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).