[Cfp-interest] WG14 IEEE 754-C binding meeting minutes 2015/02/18

Fred J. Tydeman tydeman at tybor.com
Wed Feb 18 12:35:25 PST 2015


On Wed, 18 Feb 2015 12:01:26 -0600 Rajan Bhakta wrote:
>
>        Fred: Casts are being ignored for floats to integers 'float a = 
>(float)DBL_MIN;' for every compiler I've tested. It is very hard to get 
>reproducible results as some things are done at translation time and 
>others are done at run-time.
>

That should be:

Three problems with reproducible results:
  1. Conversions from FP to integer types done wrong, eg, char c = 1e30;
     Invalid is not being raised.
  2. Casts are sometimes ignored, eg, double d = (float)DBL_MIN; when
     in non-default rounding mode.
  3. Expressions of FP constants done at translation time, yet result is
     inexact, so depends upon rounding mode.


---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (775) 287-5904      Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.



More information about the Cfp-interest mailing list