[Cfp-interest] FUNCTIONS - outline updated
Jim Thomas
jwthomas at cup.hp.com
Tue May 18 17:27:56 PDT 2010
Fred J. Tydeman wrote:
...
>
>As I recall, the issignalling() function takes a
>floating-point type. That implies to me that the
>normal function calling sequence will be used. My
>understanding is some implementations would trigger
>the SNaN doing the function call. I think this
>function needs a pointer to floating-point type.
>
>
Good point. I was thinking of issignaling as a macro, like the other
inquiry macros (isnan, etc.). However, for some implementations it might
still be difficult to implement without triggering a signal, unless the
compiler does special stuff (more than required for other inquiry
macros). Special compiler stuff would probably be needed for a macro
with pointer to floating-point type too. Easiest to implement would be
functions with a parameter that's a pointer to the floating-point type,
e.g.,
int issignalingf(const float * xp);
This would be a bit worrisome because the issignaling name (at least for
double) looks like an inquiry macro but it's not.
Ease of implementation isn't usually a weighty consideration, but
signaling NaNs will muck up everything if we let them.
-Jim
More information about the Cfp-interest
mailing list