This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Creating imaginary inf/nan in GCC


From: "Joseph S. Myers" <joseph@codesourcery.com>

On Thu, 29 Jan 2009, Kaveh R. GHAZI wrote:

I don't think these results are a bug, rather it's just an artifact of the
way complex multiplcation is done and having these special values in

See bug 24581. Some aspects are a bug (GCC doesn't handle mixed real/complex arithmetic the way it should), some are the lack of imaginary types (though the only use of imaginary types I know of is this one for building up constants, and no-one on the Power ABI working group could find any implementation for Power Architecture that actually supports imaginary types).

Thanks for the PR pointer. I'm going to ask the obvious question, if there's an obvious answer please excuse me. :-)


Would it be sufficient and correct to treat (0.0 + I) * y as a special case for MULT_EXPR and just swap the real and imaginary parts of "y" in the result?

--Kaveh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]