OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[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)