public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/31394] cos() returns wrong value unless -O0 is used
Date: Fri, 30 Mar 2007 20:56:00 -0000 [thread overview]
Message-ID: <20070330205633.13772.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31394-14147@http.gcc.gnu.org/bugzilla/>
------- Comment #4 from dominiq at lps dot ens dot fr 2007-03-30 21:56 -------
> I suppose that makes it a duplicate of PR30980.
It would have been better to check it directly before updating. PR30980 was
related to g++ and gfortran and not gcc, so it seems that your platform
(i386-pc-solaris2.10?) differs from Darwin at least.
Now, could you please time the C test of PR31249, with and without -O and
report what you get:
#include <math.h>
#include <stdio.h>
int main()
{
long n = 1000000;
long i;
double mo = -1.0;
double pi = acos(mo);
double sc = 0.0;
double ss = 0.0;
double t = 0.0;
double dt = pi/n;
printf("%.17g \n", pi);
printf("%.17g \n", dt);
for (i=0; i< 40*n; i++) {
sc += cos(t);
ss += sin(t);
t += dt;
}
printf("%.17g %.17g \n", sc, ss);
}
It will take less than a couple of minutes and see if -O is a real optimization
or not on your platform.
TIA
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31394
next prev parent reply other threads:[~2007-03-30 20:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-29 16:54 [Bug c/31394] New: " sdirkse at gams dot com
2007-03-29 16:56 ` [Bug c/31394] " sdirkse at gams dot com
2007-03-29 17:50 ` [Bug target/31394] " dominiq at lps dot ens dot fr
2007-03-30 20:36 ` sdirkse at gams dot com
2007-03-30 20:56 ` dominiq at lps dot ens dot fr [this message]
[not found] <bug-31394-4@http.gcc.gnu.org/bugzilla/>
2012-01-19 5:16 ` pinskia at gcc dot gnu.org
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=20070330205633.13772.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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: link
Be 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).