SIGNBIT 3CW "09 March 2006" "mathcw-1.00"

Table of contents


NAME

signbitf, signbit, signbitl, signbitw, signbitq, signbitll, signbitdf, signbitd, signbitdl, signbitdll - test for negative sign

SYNOPSIS

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

#include <mathcw.h>

extern int signbitf (float x);

extern int signbit (double x);

extern int signbitl (long double x);

extern int signbitw (__float80 x);

extern int signbitq (__float128 x);

extern int signbitll (long_long_double x);

extern int signbitdf (decimal_float x);

extern int signbitd (decimal_double x);

extern int signbitdl (decimal_long_double x);

extern int signbitdll (decimal_long_long_double x);

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


DESCRIPTION

Return the sign bit of the argument, either 0 (argument is positive zero or positive) or 1 (argument is negative zero or negative). The argument may be a NaN or Infinity, and no floating-point exception can be raised if it is.

Caution: The sign of a NaN is platform dependent, but that is not significant in the IEEE 754 arithmetic system.


RETURN VALUES

The sign bit is returned.

ERRORS

None.

SEE ALSO

copysign(3CW).