OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / draft / man3 / isgreater.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" 2002-07-27 Walter Harms
4 .\" this was done with the help of the glibc manual
5 .\"
6 .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
7 .\"         all rights reserved.
8 .\" Translated Fri Aug 20 04:03:26 JST 2004
9 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
10 .\" Updated & Modified Sat Jan 15 02:32:55 JST 2005 by Yuichi SATO
11 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
12 .\"
13 .TH ISGREATER 3  2010-09-20 "" "Linux Programmer's Manual"
14 .\"O .SH NAME
15 .SH 名前
16 .\"O isgreater, isgreaterequal, isless, islessequal, islessgreater,
17 .\"O isunordered \- floating-point relational tests without exception for NaN
18 isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered \-
19 NaN に対して例外を発生せずに、浮動小数点数の大小関係の判定を行う
20 .\"O .SH SYNOPSIS
21 .SH 書式
22 .nf
23 .B #include <math.h>
24 .sp
25 .BI "int isgreater(" x ", " y );
26 .sp
27 .BI "int isgreaterequal(" x ", " y );
28 .sp
29 .BI "int isless(" x ", " y );
30 .sp
31 .BI "int islessequal(" x ", " y );
32 .sp
33 .BI "int islessgreater(" x ", " y );
34 .sp
35 .BI "int isunordered(" x ", " y );
36 .fi
37 .sp
38 .\"O Link with \fI\-lm\fP.
39 \fI\-lm\fP でリンクする。
40 .sp
41 .in -4n
42 .\"O Feature Test Macro Requirements for glibc (see
43 .\"O .BR feature_test_macros (7)):
44 glibc 向けの機能検査マクロの要件
45 .RB ( feature_test_macros (7)
46 参照):
47 .in
48 .sp
49 .ad l
50 .\"O All functions described here:
51 ここで説明する全ての関数:
52 .RS
53 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
54 _POSIX_C_SOURCE\ >=\ 200112L;
55 .br
56 or
57 .I cc\ -std=c99
58 .RE
59 .ad b
60 .\"O .SH DESCRIPTION
61 .SH 説明
62 .\"O The normal relation operations (like \fB<\fP, "less than")
63 .\"O will fail if one of the operands is NaN.
64 .\"O This will cause an exception.
65 .\"O To avoid this, C99 defines these macros.
66 .\"O The macros are guaranteed to evaluate their operands only once.
67 .\"O The operands can be of any real floating-point type.
68 (\fB<\fP、「小なり」のような) 通常の関係操作 (relation operations) は、
69 オペランドの一方が NaN の場合には失敗する。
70 これは例外の原因になる。
71 これを避けるため、C99 では次のようなマクロを定義している。
72 これらのマクロはオペランドを 1 回だけ評価することが保証されている。
73 オペランドには任意の実数の浮動小数点数型を指定できる。
74 .TP
75 .BR isgreater ()
76 .\"O determines \fI(x)\ >\ (y)\fP without an exception
77 .\"O if \fIx\fP or \fIy\fP is NaN.
78 \fI(x)\ >\ (y)\fP を決定する。
79 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
80 .TP
81 .BR isgreaterequal ()
82 .\"O determines \fI(x)\ >=\ (y)\fP without an exception
83 .\"O if \fIx\fP or \fIy\fP is NaN.
84 \fI(x)\ >=\ (y)\fP を決定する。
85 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
86 .TP
87 .BR isless ()
88 .\"O determines \fI(x)\ <\ (y)\fP without an exception
89 .\"O if \fIx\fP or \fIy\fP is NaN.
90 \fI(x)\ <\ (y)\fP を決定する。
91 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
92 .TP
93 .BR islessequal ()
94 .\"O determines \fI(x)\ <=\ (y)\fP without an exception
95 .\"O if \fIx\fP or \fIy\fP is NaN.
96 \fI(x)\ <=\ (y)\fP を決定する。
97 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
98 .TP
99 .BR islessgreater ()
100 .\"O determines \fI(x)\ < (y) || (x) >\ (y)\fP
101 .\"O without an exception if \fIx\fP or \fIy\fP is NaN.
102 .\"O This macro is not equivalent to \fIx\ !=\ y\fP because that expression is
103 .\"O true if \fIx\fP or \fIy\fP is NaN.
104 \fI(x)\ < (y) || (x) >\ (y)\fP を決定する。
105 \fIx\fP または \fIy\fP が NaN でも例外を発生しない。
106 このマクロは \fIx\ !=\ y\fP と等価ではない。
107 なぜなら、この評価式は \fIx\fP または \fIy\fP が NaN の場合に
108 true となるためである。
109 .TP
110 .BR isunordered ()
111 .\"O determines whether its arguments are unordered, that is, whether
112 .\"O at least one of the arguments is a NaN.
113 引き数が unordered かどうか、つまり引き数の少なくとも一方が NaN かどうか
114 を判定する。
115 .\"O .SH RETURN VALUE
116 .SH 返り値
117 .\"O The macros other than
118 .\"O .BR isunordered ()
119 .\"O return the result of the relational comparison;
120 .\"O these macros return 0 if either argument is a NaN.
121 .BR isunordered ()
122 以外のマクロは関係操作の結果を返す。
123 一方の引き数が NaN の場合、これらのマクロは 0 を返す。
124
125 .\"O .BR isunordered ()
126 .\"O returns 1 if \fIx\fP or \fIy\fP is NaN and 0 otherwise.
127 .BR isunordered ()
128 は \fIx\fP か \fIy\fP が NaN の場合 1 を、
129 それ以外の場合 0 を返す。
130 .\"O .SH ERRORS
131 .SH エラー
132 .\"O No errors occur.
133 エラーは発生しない。
134 .\"O .SH "CONFORMING TO"
135 .SH 準拠
136 C99, POSIX.1-2001.
137 .\"O .SH NOTES
138 .SH 注意
139 .\"O Not all hardware supports these functions,
140 .\"O and where hardware support isn't provided, they will be emulated by macros.
141 .\"O This will result in a performance penalty.
142 これらの関数は全てのハードウェアでサポートされているわけではない。
143 サポートされていない場合は、マクロでエミュレートされる。
144 エミュレートされる場合は、性能上での不利となる。
145 .\"O Don't use these functions if NaN is of no concern for you.
146 NaN について心配しなくて構わない場合は、
147 これらの関数を使わないこと。
148 .\"O .SH "SEE ALSO"
149 .SH 関連項目
150 .BR fpclassify (3),
151 .BR isnan (3)