cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float snanf (const char * x); extern double snan (const char * x); extern long double snanl (const char * x); extern __float80 snanw (const char * x); extern __float128 snanq (const char * x); extern long_long_double snanll (const char * x); extern decimal_float snandf (const char * x); extern decimal_double snand (const char * x); extern decimal_long_double snandl (const char * x); extern decimal_long_long_double snandll (const char * x);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
In the mathcw library, the argument is expected to be string containing an unsigned hexadecimal integer, with an optional 0x prefix. Its low-order bits are installed in the low-order significand bits.
If the argument string is empty, or is a NULL pointer, an internal counter is incremented on each call and installed in the low-order significand bits.
On systems that lack support for both quiet and signaling NaNs, but provide just one kind of NaN, such as older versions of the Intel IA-32 architecture, and the Java Virtual Machine, this function returns a NaN that behaves like a quiet NaN. In particular, on such systems, moving a signaling NaN between registers and memory can turn it into a quiet NaN. A similar mutation happens on Motorola 68K systems, but only for snanl().