1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
4 .\" Distributed under GPL
5 .\" Based on glibc infopages
6 .TH SIGNBIT 3 2008-08-05 "GNU" "Linux Programmer's Manual"
8 signbit \- test sign of a real floating-point number
10 .B "#include <math.h>"
12 .BI "int signbit(" x ");"
17 Feature Test Macro Requirements for glibc (see
18 .BR feature_test_macros (7)):
23 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
28 is a generic macro which can work on all real floating-point types.
29 It returns a non-zero value if the value of
33 This is not the same as
35 because IEEE 754 floating point allows zero to be signed.
40 will return a non-zero value.
42 NaNs and infinities have a sign bit.
46 macro returns non-zero if the sign of
48 is negative; otherwise it returns zero.
53 This function is defined in IEC 559 (and the appendix with
54 recommended functions in IEEE 754/IEEE 854).