OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man3 / signbit.3
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, copyright Free Software Foundation
6 .\"*******************************************************************
7 .\"
8 .\" This file was generated with po4a. Translate the source file.
9 .\"
10 .\"*******************************************************************
11 .TH SIGNBIT 3 2010\-09\-20 GNU "Linux Programmer's Manual"
12 .SH 名前
13 signbit \- 浮動小数点実数の符号 (sign) を調べる
14 .SH 書式
15 \fB#include <math.h>\fP
16 .sp
17 \fBint signbit(\fP\fIx\fP\fB);\fP
18 .sp
19 \fI\-lm\fP でリンクする。
20 .sp
21 .in -4n
22 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
23 .in
24 .sp
25 .ad l
26 \fBsignbit\fP():
27 .RS 4
28 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
29 .br
30 or \fIcc\ \-std=c99\fP
31 .RE
32 .ad
33 .SH 説明
34 \fBsignbit\fP()  は、あらゆる種類の浮動小数点実数に対して 適用可能な汎用的なマクロである。 \fIx\fP
35 の値の符号ビットがセットされている場合、非 0 の値を返す。
36 .PP
37 このマクロは \fIx < 0.0\fP と全く同じではない。 なぜなら、IEEE 754 の浮動小数点表現では 0 も符号を持つからである。
38 \fI\-0.0 < 0.0\fP という比較結果は偽 (false) だが、 \fIsignbit (\-0.0)\fP は 非 0 の値を返す。
39
40 NaN と無限大には符号ビットがある。
41 .SH 返り値
42 \fBsignbit\fP()  マクロは \fIx\fP の符号が負の場合 0 以外を返し、そうでない場合 0 を返す。
43 .SH エラー
44 エラーは発生しない。
45 .SH 準拠
46 C99, POSIX.1\-2001.  この関数は IEC 559 で定義されている (また IEEE 754/IEEE 854
47 では付録で推奨関数として定義されている)。
48 .SH 関連項目
49 \fBcopysign\fP(3)