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 2021-03-22 "GNU" "Linux Programmer's Manual"
13 signbit \- test sign of a real floating-point number
16 .B "#include <math.h>"
18 .BI "int signbit(" x ");"
24 Feature Test Macro Requirements for glibc (see
25 .BR feature_test_macros (7)):
30 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
34 is a generic macro which can work on all real floating-point types.
35 It returns a nonzero value if the value of
39 This is not the same as
41 because IEEE 754 floating point allows zero to be signed.
46 will return a nonzero value.
48 NaNs and infinities have a sign bit.
52 macro returns nonzero if the sign of
54 is negative; otherwise it returns zero.
58 For an explanation of the terms used in this section, see
66 Interface Attribute Value
69 T} Thread safety MT-Safe
75 POSIX.1-2001, POSIX.1-2008, C99.
76 This function is defined in IEC 559 (and the appendix with
77 recommended functions in IEEE 754/IEEE 854).