PSNAN 3CW "12 July 2007" "mathcw-1.00"

Table of contents


NAME

psnan, psnan, psnanl, psnanw, psnanq, psnanll, psnandf, psnand, psnandl, psnandll - pair-precision signaling NaN function

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>
#include <paircw.h>

extern void psnanf (float_pair result, const char * tag);

extern void psnan (double_pair result, const char * tag);

extern void psnanl (long_double_pair result, const char * tag);

extern void psnanw (__float80_pair result, const char * tag);

extern void psnanq (__float128_pair result, const char * tag);

extern void psnanll (long_long_double_pair result, const char * tag);

extern void psnandf (decimal_float_pair result, const char * tag);

extern void psnand (decimal_double_pair result, const char * tag);

extern void psnandl (decimal_long_double_pair result, const char * tag);

extern void psnandll (decimal_long_long_double_pair result, const char * tag);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Compute a signaling NaN, setting its content according to the string pointed to by the tag argument.

In the mathcw library, the tag 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 tag argument string is empty, or is NULL pointer, an internal counter is incremented on each call and installed in the low-order significand bits.

The generated signaling NaN is copied to both high and low parts of the function result.


RETURN VALUES

The function result is a freshly-computed signaling NaN, or zero if NaNs are not supported.

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 generates 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 psnanl().

None. The function result is stored in the first argument, result.


ERRORS

In IEEE 754 and 854 arithmetic, the invalid exception flag is always set, but errno is never set.

SEE ALSO

pabs(3CW), pacos(3CW), pacosh(3CW), padd(3CW), pasin(3CW), pasinh(3CW), patan(3CW), patan2(3CW), patanh(3CW), pcbrt(3CW), pcmp(3CW), pcon(3CW), pcopy(3CW), pcopysign(3CW), pcos(3CW), pcosh(3CW), pcotan(3CW), pdiv(3CW), pdot(3CW), peps(3CW), peval(3CW), pexp(3CW), pexp10(3CW), pexp16(3CW), pexp2(3CW), pexp8(3CW), pexpm1(3CW), pfdim(3CW), pfmax(3CW), pfmin(3CW), pfrexp(3CW), pfrexph(3CW), phigh(3CW), phypot(3CW), pierf(3CW), pierfc(3CW), pilogb(3CW), pin(3CW), pinfty(3CW), pipow(3CW), pisinf(3CW), pisnan(3CW), pisqnan(3CW), pissnan(3CW), pldexp(3CW), pldexph(3CW), plog(3CW), plog101p(3CW), plog1p(3CW), plow(3CW), pmul(3CW), pmul2(3CW), pneg(3CW), pout(3CW), pprosum(3CW), pqnan(3CW), pscalbln(3CW), pscalbn(3CW), pset(3CW), psignbit(3CW), psin(3CW), psinh(3CW), psplit(3CW), psqrt(3CW), psub(3CW), psum(3CW), psum2(3CW), ptan(3CW), ptanh(3CW).