From: Richard Guenther <richard.guenther@gmail.com>
To: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Cc: "Joseph S. Myers" <joseph@codesourcery.com>, gcc@gcc.gnu.org
Subject: Re: What is -3.I (as opposed to 0-3.I) supposed evaluate to?
Date: Tue, 09 Jun 2009 15:33:00 -0000 [thread overview]
Message-ID: <84fc9c000906090832u2a8f6df1k85cff4f190d40ebf@mail.gmail.com> (raw)
In-Reply-To: <AC7E0540BCE34774B8CABCBCAF5930C0@glap>
On Tue, Jun 9, 2009 at 11:26 AM, Kaveh R. Ghazi<ghazi@caip.rutgers.edu> wrote:
> From: "Joseph S. Myers" <joseph@codesourcery.com>
>
>> On Mon, 8 Jun 2009, Kaveh R. Ghazi wrote:
>>
>>> Perhaps the only safe way to create the value, even in the presence of
>>> rounding mode changes, is to use conj(3.I) ?
>>
>> Setting the __real__ and __imag__ parts of a temporary variable should
>> always be reliable for making a complex number out of arbitrary real and
>> imaginary parts.
>
> Well yes, but I meant for compile-time expressions that are exposed to fold
> even at -O0. (Recall that I'm writing testcases for the MPC stuff.) I'm
> not 100% confident that the temporary variable will always fold and it's too
> verbose when repeatedly used in a testcase. With conj, the builtin will
> always fold 3.I and won't do anything unexpected with rounding modes.
It should always be folded via CCP / value-numbering. If not that is a bug
that needs to be fixed.
Richard.
> I was just wondering why -3.I was evaluating differently than 0-3.I and
> whether it was a bug. Your explanation was very useful.
> Thanks,
> --Kaveh
>
>
prev parent reply other threads:[~2009-06-09 15:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 20:12 Kaveh R. GHAZI
2009-06-08 20:33 ` Joseph S. Myers
2009-06-09 2:08 ` Kaveh R. Ghazi
2009-06-09 11:22 ` Joseph S. Myers
2009-06-09 15:26 ` Kaveh R. Ghazi
2009-06-09 15:33 ` Richard Guenther [this message]
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=84fc9c000906090832u2a8f6df1k85cff4f190d40ebf@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=ghazi@caip.rutgers.edu \
--cc=joseph@codesourcery.com \
/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).