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 .\" SPDX-License-Identifier: GPL-1.0-or-later
7 .\" Based on glibc infopages, copyright Free Software Foundation
9 .TH SIGNBIT 3 2021-03-22 "Linux man-pages (unreleased)"
11 signbit \- test sign of a real floating-point number
14 .RI ( libm ", " \-lm )
17 .B "#include <math.h>"
19 .BI "int signbit(" x ");"
23 Feature Test Macro Requirements for glibc (see
24 .BR feature_test_macros (7)):
29 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
33 is a generic macro which can work on all real floating-point types.
34 It returns a nonzero value if the value of
38 This is not the same as
40 because IEEE 754 floating point allows zero to be signed.
45 will return a nonzero value.
47 NaNs and infinities have a sign bit.
51 macro returns nonzero if the sign of
53 is negative; otherwise it returns zero.
57 For an explanation of the terms used in this section, see
65 Interface Attribute Value
68 T} Thread safety MT-Safe
74 POSIX.1-2001, POSIX.1-2008, C99.
75 This function is defined in IEC 559 (and the appendix with
76 recommended functions in IEEE 754/IEEE 854).