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
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>
13 .TH ISGREATER 3 2010-09-20 "" "Linux Programmer's Manual"
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 に対して例外を発生せずに、浮動小数点数の大小関係の判定を行う
25 .BI "int isgreater(" x ", " y );
27 .BI "int isgreaterequal(" x ", " y );
29 .BI "int isless(" x ", " y );
31 .BI "int islessequal(" x ", " y );
33 .BI "int islessgreater(" x ", " y );
35 .BI "int isunordered(" x ", " y );
38 .\"O Link with \fI\-lm\fP.
42 .\"O Feature Test Macro Requirements for glibc (see
43 .\"O .BR feature_test_macros (7)):
45 .RB ( feature_test_macros (7)
50 .\"O All functions described here:
53 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
54 _POSIX_C_SOURCE\ >=\ 200112L;
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 の場合には失敗する。
71 これを避けるため、C99 では次のようなマクロを定義している。
72 これらのマクロはオペランドを 1 回だけ評価することが保証されている。
73 オペランドには任意の実数の浮動小数点数型を指定できる。
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 でも例外を発生しない。
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 でも例外を発生しない。
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 でも例外を発生しない。
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 でも例外を発生しない。
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 の場合に
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 かどうか
115 .\"O .SH RETURN VALUE
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.
123 一方の引き数が NaN の場合、これらのマクロは 0 を返す。
125 .\"O .BR isunordered ()
126 .\"O returns 1 if \fIx\fP or \fIy\fP is NaN and 0 otherwise.
128 は \fIx\fP か \fIy\fP が NaN の場合 1 を、
132 .\"O No errors occur.
134 .\"O .SH "CONFORMING TO"
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 について心配しなくて構わない場合は、