public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug other/57675] Complex division of NaN by zero not handled correctly Date: Sat, 22 Jun 2013 17:29:00 -0000 [thread overview] Message-ID: <bug-57675-4-GLrSK93dRg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-57675-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57675 --- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- N1399 has a detailed analysis of issues with complex multiply and divide in C99. There was no consensus to adopt requirements in that detail, but N1496 was adopted with a more minimal fix for (1.0+1.0*I)/(0.0+NAN*I). It appears that the GCC implementation does not suffer the particular issue being addressed in N1496. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1399.txt http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1496.htm I believe the model in N1399 (and more generally for NaNs in C99/C11 and the draft TS 18661 bindings to IEEE 754-2008; see e.g. how hypot(NaN, Inf) works) is that NaN+1.0i is considered (for a quiet NaN) to be <unspecified-real>+1.0i. Dividing by zero then gives an unspecified (or not fully specified) infinity, so a result with one part infinity and one part NaN seems appropriate.
next prev parent reply other threads:[~2013-06-22 17:29 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-57675-4@http.gcc.gnu.org/bugzilla/> 2013-06-22 15:12 ` ian at airs dot com 2013-06-22 17:29 ` joseph at codesourcery dot com [this message] 2013-06-22 19:33 ` ian at airs dot com
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=bug-57675-4-GLrSK93dRg@http.gcc.gnu.org/bugzilla/ \ --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: 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).