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>
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
9 .\" Based on glibc infopages, copyright Free Software Foundation
11 .TH SIGNBIT 3 2013-07-04 "GNU" "Linux Programmer's Manual"
13 signbit \- test sign of a real floating-point number
15 .B "#include <math.h>"
17 .BI "int signbit(" x ");"
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
29 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
30 _POSIX_C_SOURCE\ >=\ 200112L;
38 is a generic macro which can work on all real floating-point types.
39 It returns a nonzero value if the value of
43 This is not the same as
45 because IEEE 754 floating point allows zero to be signed.
50 will return a nonzero value.
52 NaNs and infinities have a sign bit.
56 macro returns nonzero if the sign of
58 is negative; otherwise it returns zero.
62 .SS Multithreading (see pthreads(7))
68 This function is defined in IEC 559 (and the appendix with
69 recommended functions in IEEE 754/IEEE 854).