[Cfp-interest] question about wide evaluation and comparison macros

Jim Thomas jwthomas at cup.hp.com
Mon May 10 16:53:42 PDT 2010


CFPers,

A question ...

For the C implementations you're aware of that provide a wide evaluation 
method and the C99 comparison macros (isgreater, etc.), do the 
implementations narrow comparison macro arguments (that are evaluated to 
a wider format) to the types of the arguments?

You might try

#include <stdio.h>
#include <math.h>
int main() {
         if (isgreater(1.0f +1e-10f, 1.0f))
                 printf("not narrowed\n");
         else    printf("narrowed\n");
}

or such, with a wide evaluation method in effect.

The attached paper for the C meetings May 25-27 gives context for the 
question.

-Jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CompMacroArgConv.pdf
Type: application/pdf
Size: 49368 bytes
Desc: not available
Url : http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20100510/62f2fcdc/attachment-0001.pdf 


More information about the Cfp-interest mailing list