<HTML>
<div><style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>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.&nbsp; I would report this as a GCC bug, on the grounds that using inline code and using a library shouldn't differ significantly.&nbsp; If I could, I would also try LLVM.</div><div><br>
</div><div>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.</div><div><br>
</div><div>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.&nbsp; ðŸ˜€&nbsp;&nbsp; I might also try IBM's PPC MASS library, and their z/OS compiler.</div><div><br>
</div><div>All that of course would make it a fairly big job . . .&nbsp; fortunately for me, I don't have access to any of those.&nbsp; If somebody wants to send me assembler code to compare I'll have a look at it though.<br>
</div><div><br>
</div><div>&nbsp;- Ian McIntosh<br>
</div><br>
<br>
<span style="font-weight: bold;">On Mon 20/02/10  4:41 AM , paul zimmermann Paul.Zimmermann@inria.fr sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">       Dear Damian,
<br>


<br>

on the gcc10 machine from the GCC compile farm, with gcc 6.3.0, I get:
<br>


<br>

x=(-1.0689346237980500e+252,7.8846096489686452e-145)
<br>

y=(5.1152592576527620e-318,6.7327111521288819e+78)
<br>

x/y=(1.1710898434244477e-223,1.5876733750267203e+173)
<br>


<br>

Same on the machine "devel03" from the Plafrim platform with gcc 4.8.5:
<br>


<br>

x=(-1.0689346237980500e+252,7.8846096489686452e-145)
<br>

y=(5.1152592576527620e-318,6.7327111521288819e+78)
<br>

x/y=(1.1710898434244477e-223,1.5876733750267203e+173)
<br>


<br>

This is with -O0 (or no -O option), with -O1 or higher I get the MPC result
<br>

(since then GCC uses constant folding, calling MPC).
<br>


<br>

Paul
<br>


<br>

<span style="color: red;">&gt; Date: Sun, 9 Feb 2020 22:22:35 +1100 (AEDT)
</span><br>

<span style="color: red;">&gt; From: Damian McGuckin &lt;<a href="javascript:top.opencompose('damianm@esi.com.au','','','')">damianm@esi.com.au</a>&gt;
</span><br>

<span style="color: red;">&gt; 
</span><br>

<span style="color: red;">&gt; I tried your program on a GCC 9.2.1 on Power9, and GCC 4.8.1 and 8.? on 
</span><br>

<span style="color: red;">&gt; Xeon. I was specifically looking at division because something is very 
</span><br>

<span style="color: red;">&gt; obviously wrong. You mentioned:
</span><br>

<span style="color: red;">&gt; 
</span><br>

<span style="color: red;">&gt; &gt;  /* MPC gives       (-3.5164330596706266e-225,1.5876733750267203e+173) */
</span><br>

<span style="color: red;">&gt; &gt;  /* GCC 9.2.1 gives (1.1710898434244477e-223,1.5876733750267203e+173) */
</span><br>

<span style="color: red;">&gt; &gt;  /* ICC 19.0.4.243: (-3.5164330596706266e-225,1.5876733750267203e+173) */
</span><br>

<span style="color: red;">&gt; 
</span><br>

<span style="color: red;">&gt; I get the same answer as MPC. Not your answer. On an ancient Xeon with GCC 
</span><br>

<span style="color: red;">&gt; 4.4.7, I get your 1.171.....e-223 answer. A quick guess is that something 
</span><br>

<span style="color: red;">&gt; is probably not quite right with your installation of GCC. But I could be
</span><br>

<span style="color: red;">&gt; wrong.
</span><br>

<span style="color: red;">&gt; 
</span><br>

<span style="color: red;">&gt; Regards - Damian
</span><br>

<span style="color: red;">&gt; 
</span><br>

<span style="color: red;">&gt; Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
</span><br>

<span style="color: red;">&gt; Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
</span><br>

<span style="color: red;">&gt; Views &amp; opinions here are mine and not those of any past or present employer
</span><br>

<span style="color: red;">&gt; 
</span><br>

_______________________________________________
<br>

Cfp-interest mailing list
<br>

<a href="javascript:top.opencompose('Cfp-interest@oakapple.net','','','')">Cfp-interest@oakapple.net</a>
<br>

<a target="_blank" href="parse.php?redirect=http%3A%2F%2Fmailman.oakapple.net%2Fmailman%2Flistinfo%2Fcfp-interest"><span style="color: red;">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</span></a>
<br>


<br>

<br>

</blockquote><BR></HTML>