[Cfp-interest 1479] Re: complex multiplication and division
Ian McIntosh
ianmc at eol.ca
Mon Feb 10 07:23:18 PST 2020
BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }As
a user, I would not expect the result of a single arithmetic
operation to differ so dramatically between -O0 and -O1, or to differ
so dramatically between GCC and ICC. I would report this as a GCC
bug, on the grounds that using inline code and using a library
shouldn't differ significantly. If I could, I would also try LLVM.
As a former compiler developer, if company lawyers didn't object and
I had access to a GCC and an ICC compiler and maybe LLVM I might look
at the assembly code generated and see why the results are so
different.
If I still worked for IBM, I might see what result IBM's XLC, GCC
and LLVM compilers (where possible with both double-double and
binary128) produced - likely different again. I might also
try IBM's PPC MASS library, and their z/OS compiler.
All that of course would make it a fairly big job . . . fortunately
for me, I don't have access to any of those. If somebody wants to
send me assembler code to compare I'll have a look at it though.
- Ian McIntosh
On Mon 20/02/10 4:41 AM , paul zimmermann Paul.Zimmermann at inria.fr
sent:
Dear Damian,
on the gcc10 machine from the GCC compile farm, with gcc 6.3.0, I
get:
x=(-1.0689346237980500e+252,7.8846096489686452e-145)
y=(5.1152592576527620e-318,6.7327111521288819e+78)
x/y=(1.1710898434244477e-223,1.5876733750267203e+173)
Same on the machine "devel03" from the Plafrim platform with gcc
4.8.5:
x=(-1.0689346237980500e+252,7.8846096489686452e-145)
y=(5.1152592576527620e-318,6.7327111521288819e+78)
x/y=(1.1710898434244477e-223,1.5876733750267203e+173)
This is with -O0 (or no -O option), with -O1 or higher I get the MPC
result
(since then GCC uses constant folding, calling MPC).
Paul
> Date: Sun, 9 Feb 2020 22:22:35 +1100 (AEDT)
> From: Damian McGuckin
>
> I tried your program on a GCC 9.2.1 on Power9, and GCC 4.8.1 and
8.? on
> Xeon. I was specifically looking at division because something is
very
> obviously wrong. You mentioned:
>
> > /* MPC gives
(-3.5164330596706266e-225,1.5876733750267203e+173) */
> > /* GCC 9.2.1 gives
(1.1710898434244477e-223,1.5876733750267203e+173) */
> > /* ICC 19.0.4.243:
(-3.5164330596706266e-225,1.5876733750267203e+173) */
>
> I get the same answer as MPC. Not your answer. On an ancient Xeon
with GCC
> 4.4.7, I get your 1.171.....e-223 answer. A quick guess is that
something
> is probably not quite right with your installation of GCC. But I
could be
> wrong.
>
> Regards - Damian
>
> Pacific Engineering Systems International, 277-279 Broadway, Glebe
NSW 2037
> Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not
wanted here
> Views & opinions here are mine and not those of any past or
present employer
>
_______________________________________________
Cfp-interest mailing list
Cfp-interest at oakapple.net [2]
http://mailman.oakapple.net/mailman/listinfo/cfp-interest
Links:
------
[1]
http://webmail.primus.ca/javascript:top.opencompose(\'damianm@esi.com.au\',\'\',\'\',\'\')
[2]
http://webmail.primus.ca/javascript:top.opencompose(\'Cfp-interest@oakapple.net\',\'\',\'\',\'\')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20200210/6bcea200/attachment.html
More information about the Cfp-interest
mailing list