public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: "Knox S. Long" <long@stsci.edu> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c/5277: NaN unexpectedly Date: Sun, 06 Jan 2002 10:36:00 -0000 [thread overview] Message-ID: <20020106183601.30855.qmail@sources.redhat.com> (raw) The following reply was made to PR c/5277; it has been noted by GNATS. From: "Knox S. Long" <long@stsci.edu> To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, long@stsci.edu, gcc-bugs@gcc.gnu.org Cc: Subject: Re: c/5277: NaN unexpectedly Date: Sun, 06 Jan 2002 13:33:49 -0500 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5277 Mea culpa! I now understand the cause of this problem and I don't know whether it is a bug or not. In all of the cases in which this problem appeared, it was in a function which had been declared as a double, e.g. double thierry_velocity (x, v) double x[]; double v[]; { int n; ... In this particular case what was being calculated was a velocity v from a position x. The routine was returning the speed, which is simply a double precision number. In this and all of the other cases where I observed this problem, the routine had not been declared as a double in the calling routine (since I was not actually interested in the returned value). Once this was done the program, all spurious instances on Nan disappeared. I have no idea of course whether this is the expected performance of gcc, though certainly the problem is not dire for me if it is. It was lesson to me to use -Wall on anything I really seriously care about. I apologize to anyone this has inconvenienced. Sincerely, Knox Long
next reply other threads:[~2002-01-06 18:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-01-06 10:36 Knox S. Long [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-11-05 7:59 bangerth 2002-01-04 11:06 long
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=20020106183601.30855.qmail@sources.redhat.com \ --to=long@stsci.edu \ --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).