[Cfp-interest] implementing tgmath for constant rounding modes

Fred J. Tydeman tydeman at tybor.com
Mon Jun 11 21:06:07 PDT 2012


On Thu, 07 Jun 2012 19:22:20 -0400 Joel C. Salomon wrote:
>
>Except that attributes were not accepted into C11.

OK, so make it a keyword and a Function specifier 
like inline and _Noreturn.  Perhaps, _Roundwise

>Also, looking at <http://open-std.org/jtc1/sc22/wg14/www/docs/n1403.pdf>
>where attributes for C++ are described, it does not seem to me that they
>can be used in this way, only for declarations and listed control
>constructs.
>
>So you'd be left with including [[roundwise]] in the function
>declaration, e.g.:
>
>    double cbrt [[roundwise]] (double);

Or,

_Roundwise double cbrt(double);



---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (775) 358-9748      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