2 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
4 .\" <mtk.manpages@gmail.com>
6 .\" SPDX-License-Identifier: GPL-1.0-or-later
8 .\" Based on glibc infopages, copyright Free Software Foundation
10 .TH signbit 3 (date) "Linux man-pages (unreleased)"
12 signbit \- test sign of a real floating-point number
15 .RI ( libm ", " \-lm )
18 .B "#include <math.h>"
20 .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
79 This function is defined in IEC 559 (and the appendix with
80 recommended functions in IEEE 754/IEEE 854).