[Cfp-interest 1484] Re: complex multiplication and division
paul zimmermann
Paul.Zimmermann at inria.fr
Mon Feb 10 23:36:06 PST 2020
Dear Damian,
> Date: Tue, 11 Feb 2020 11:31:27 +1100 (AEDT)
> From: Damian McGuckin <damianm at esi.com.au>
>
> That really wild answer seen in your division is a compiler bug and should
> be reported as such. I more rigorously reran your examples and I also get
> the incorrect 1.17... with -O0 on both 4.8.5 and 9.2.1 on a XEON but the
> correct numbers for -O1 and above. Also, on 4.4.7 on a XEON, it gets it
> wrong at any level of optimization. It seems like it is a compiler bug
> that was half fixed. Note that I do not see this problem on a Power9 with
> gcc 9.1.1 running CentOS 8. It gets it right at any level of optimization.
> I do apologize that I misreported that gcc version earlier as 9.2.1. I
> blame my dyslexic fingers. I note also that
>
> double complex x = 1.0e+200 + INFINITY * I;
> double complex y = INFINITY * I;
>
> both produce NaN + INFINITY * I. So the problems are more fundamental.
>
> Remember too that the description of this group is "IEC 60559 Floating
> point support in C". As complex arithmetic is not covered in IEC 60559
> (IEEE 754), it is out of scope for the CFP, even if it is of interest to
> many of us. Just a thought.
yes this is why I wrote in my first mail "I hope this is not off-topic".
I have reported the issue on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60181
for those who are interested to follow-up.
Paul
More information about the Cfp-interest
mailing list