<html><body>
<p><font size="2" face="sans-serif">For #3 "</font><tt><font size="2">Expressions of FP constants done at translation time, yet result is inexact, so depends upon rounding mode.</font></tt><font size="2" face="sans-serif">", the IBM POWER XL and z/OS compilers have an option -y to control which rounding mode to use for expressions evaluated at compile time. Does that meet the requirement?</font><br>
<br>
<font size="2" face="sans-serif">They also have an option -qfloat=nofold to defer almost all floating-point expression evaluation until execution time (all but static initialization). Some (not all yet) operations that cause an overflow or invalid operation (but not underflow or inexact) are automatically deferred until execution time (except in static initialization) even without -qfloat=nofold.</font><br>
<font size="2" face="sans-serif"><br>
- Ian McIntosh IBM Canada Lab Compiler Back End Support and Development<br>
</font><br>
<br>
<img width="16" height="16" src="cid:1__=0ABBF762DFCF88778f9e8a93df938@ca.ibm.com" border="0" alt="Inactive hide details for "Fred J. Tydeman" ---2015-02-18 03:37:14 PM---On Wed, 18 Feb 2015 12:01:26 -0600 Rajan Bhakta wrote: "><font size="2" color="#424282" face="sans-serif">"Fred J. Tydeman" ---2015-02-18 03:37:14 PM---On Wed, 18 Feb 2015 12:01:26 -0600 Rajan Bhakta wrote: ></font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">From:        </font><font size="1" face="sans-serif">"Fred J. Tydeman" <tydeman@tybor.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">"cfp-interest@oakapple.net" <cfp-interest@oakapple.net>, "Rajan Bhakta" <rbhakta@us.ibm.com></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Date:        </font><font size="1" face="sans-serif">2015-02-18 03:37 PM</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Subject:        </font><font size="1" face="sans-serif">Re: [Cfp-interest] WG14 IEEE 754-C binding meeting minutes        2015/02/18</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Sent by:        </font><font size="1" face="sans-serif">cfp-interest-bounces@oakapple.net</font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt><font size="2">On Wed, 18 Feb 2015 12:01:26 -0600 Rajan Bhakta wrote:<br>
><br>
> Fred: Casts are being ignored for floats to integers 'float a = <br>
>(float)DBL_MIN;' for every compiler I've tested. It is very hard to get <br>
>reproducible results as some things are done at translation time and <br>
>others are done at run-time.<br>
><br>
<br>
That should be:<br>
<br>
Three problems with reproducible results:<br>
1. Conversions from FP to integer types done wrong, eg, char c = 1e30;<br>
Invalid is not being raised.<br>
2. Casts are sometimes ignored, eg, double d = (float)DBL_MIN; when<br>
in non-default rounding mode.<br>
3. Expressions of FP constants done at translation time, yet result is<br>
inexact, so depends upon rounding mode.<br>
<br>
<br>
---<br>
Fred J. Tydeman Tydeman Consulting<br>
tydeman@tybor.com Testing, numerics, programming<br>
+1 (775) 287-5904 Vice-chair of PL22.11 (ANSI "C")<br>
Sample C99+FPCE tests: </font></tt><tt><font size="2"><a href="http://www.tybor.com">http://www.tybor.com</a></font></tt><tt><font size="2"><br>
Savers sleep well, investors eat well, spenders work forever.<br>
<br>
_______________________________________________<br>
Cfp-interest mailing list<br>
Cfp-interest@oakapple.net<br>
</font></tt><tt><font size="2"><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</a></font></tt><tt><font size="2"><br>
<br>
</font></tt><br>
</body></html>