OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / remainder.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\"
30 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
31 .\" Modified 2002-08-10 Walter Harms
32 .\"     (walter.harms@informatik.uni-oldenburg.de)
33 .\" Modified 2003-11-18, 2004-10-05 aeb
34 .\"
35 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
36 .\" and Copyright (c) 2008 Akihiro MOTOKI
37 .\" Translated 2004-09-02, Yuichi SATO <ysato444@yahoo.co.jp>
38 .\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\" Modified 2005-02-26, Yuichi SATO <ysato444@yahoo.co.jp>
40 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
41 .\"
42 .TH REMAINDER 3 2010-09-20 "" "Linux Programmer's Manual"
43 .SH Ì¾Á°
44 drem, dremf, dreml, remainder, remainderf, remainderl \- ÉâÆ°¾®¿ôÅÀ¾ê;´Ø¿ô
45 .SH ½ñ¼°
46 .nf
47 .B #include <math.h>
48 .sp
49 /* C99 ÈÇ */
50 .BI "double remainder(double " x ", double " y );
51 .BI "float remainderf(float " x ", float " y );
52 .BI "long double remainderl(long double " x ", long double " y );
53 .sp
54 /* Çѻߤµ¤ì¤¿ÊÌ̾ */
55 .BI "double drem(double " x ", double " y );
56 .BI "float dremf(float " x ", float " y );
57 .BI "long double dreml(long double " x ", long double " y );
58 .sp
59 .fi
60 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
61 .sp
62 .in -4n
63 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
64 .RB ( feature_test_macros (7)
65 »²¾È):
66 .in
67 .sp
68 .ad l
69 .BR remainder ():
70 .RS 4
71 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
72 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED ||
73 _ISOC99_SOURCE ||
74 _POSIX_C_SOURCE\ >=\ 200112L;
75 .br
76 or
77 .I cc\ -std=c99
78 .RE
79 .br
80 .BR remainderf (),
81 .BR remainderl ():
82 .RS 4
83 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
84 _POSIX_C_SOURCE\ >=\ 200112L;
85 .br
86 or
87 .I cc\ -std=c99
88 .RE
89 .br
90 .BR drem (),
91 .BR dremf (),
92 .BR dreml ():
93 .RS 4
94 _SVID_SOURCE || _BSD_SOURCE
95 .RE
96 .ad b
97 .SH ÀâÌÀ
98 .BR remainder ()
99 ´Ø¿ô¤Ï
100 .I x
101 ¤ò
102 .I y
103 ¤Ç³ä¤Ã¤¿Í¾¤ê¤ò·×»»¤¹¤ë¡£
104 ÊÖ¤êÃͤÏ
105 \fIx\fP\-\fIn\fP*\fIy\fP
106 ¤Ç¤¢¤ë¡£
107 ¤³¤³¤Ç
108 .I n
109 ¤Ï
110 .I "x\ /\ y"
111 ¤ÎÃͤòºÇ¤â¶á¤¤À°¿ô¤Ë´Ý¤á¤¿¤â¤Î¤Ç¤¢¤ë¡£
112 \fIx\fP\-\fIn\fP*\fIy\fP
113 ¤ÎÀäÂÐÃͤ¬ 0.5 ¤Î¾ì¹ç¡¢¶ö¿ô¤Ë¤Ê¤ë¤è¤¦¤Ë
114 .I n
115 ¤¬Áª¤Ð¤ì¤ë¡£
116
117 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¸½ºß¤Î´Ý¤á¥â¡¼¥É¤Î±Æ¶Á¤ò¼õ¤±¤Ê¤¤ (´Ý¤á¥â¡¼¥É¤Ë¤Ä¤¤¤Æ¤Ï
118 .BR fenv (3)
119 ¤ò»²¾È)¡£
120 .LP
121 .BR drem ()
122 ´Ø¿ô¤Ï¤³¤ì¤ÈÁ´¤¯Æ±¤¸Æ°ºî¤ò¤¹¤ë¡£
123 .SH ÊÖ¤êÃÍ
124 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤ÏÉâÆ°¾®¿ôÅÀ¤Î¾ê; \fIx\fP\-\fIn\fP*\fIy\fP ¤òÊÖ¤¹¡£
125 ÊÖ¤êÃͤ¬ 0 ¤Î¾ì¹ç¡¢¤½¤ÎÉä¹æ¤Ï
126 .I x
127 ¤ÈƱ¤¸¤Ë¤Ê¤ë¡£
128
129 .I x
130 ¤«
131 .I y
132 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
133
134 .I x
135 ¤¬Ìµ¸ÂÂç¤Ç
136 .I y
137 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢
138 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
139
140 .\" FIXME . Instead, glibc gives a domain error even if x is a NaN
141 .\" Interestingly, remquo(3) does not have the same problem.
142 .I y
143 ¤¬¥¼¥í¤Ç
144 .I x
145 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢
146 Îΰ襨¥é¡¼¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
147 .SH ¥¨¥é¡¼
148 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
149 .BR math_error (7)
150 ¤ò»²¾È¤Î¤³¤È¡£
151 .PP
152 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
153 .TP
154 Îΰ襨¥é¡¼ (domain error): \fIx\fP ¤¬Ìµ¸ÂÂç¤Ç \fIy\fP ¤¬ NaN ¤Ç¤Ï¤Ê¤¤
155 .\" .I errno
156 .\" is set to
157 .\" .BR EDOM .
158 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
159 .RB ( FE_INVALID )
160 ¤¬¾å¤¬¤ë¡£
161 .IP
162 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¤³¤Î¾ì¹ç¤Ë
163 .I errno
164 ¤òÀßÄꤷ¤Ê¤¤¡£
165 .\" FIXME . Is it intentional that these functions do not set errno?
166 .\" They do set errno for the y == 0 case, below.
167 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6783
168 .TP
169 Îΰ襨¥é¡¼: \fIy\fP ¤¬¥¼¥í¤Ç \fIx\fP ¤¬ NaN ¤Ç¤Ï¤Ê¤¤ (²¼µ­¤Î¡Ö¥Ð¥°¡×»²¾È)
170 .I errno
171 ¤Ë
172 .B EDOM
173 ¤¬ÀßÄꤵ¤ì¤ë¡£
174 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
175 .RB ( FE_INVALID )
176 ¤¬¾å¤¬¤ë¡£
177 .SH ½àµò
178 .\" IEC 60559.
179 ´Ø¿ô
180 .BR remainder (),
181 .BR remainderf (),
182 .BR remainderl ()
183 ¤Ï C99 ¤È POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
184
185 ´Ø¿ô
186 .BR drem ()
187 ¤Ï 4.3BSD ¤ËͳÍ褹¤ë¡£
188 .I float
189 ¤È
190 .I "long double"
191 ÈǤÎ
192 .BR dremf ()
193 ¤È
194 .BR dreml ()
195 ¤Ï¡¢Tru64 ¤ä glibc2 ¤Î¤è¤¦¤Ê¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ë¸ºß¤¹¤ë¡£
196 ¤³¤ì¤é¤Î´Ø¿ô¤Î»ÈÍѤÏÈò¤±¤Æ¡¢
197 .BR remainder ()
198 ¤Ê¤É¤ò»ÈÍѤ¹¤ë¤³¤È¡£
199 .SH ¥Ð¥°
200
201     remainder(nan(""), 0);
202
203 ¤Î¸Æ¤Ó½Ð¤·¤ò¹Ô¤¦¤È¡¢´üÂÔÄ̤ê Nan ¤¬Ê֤뤬¡¢¸í¤Ã¤ÆÎΰ襨¥é¡¼¤¬È¯À¸¤¹¤ë¡£
204 Àµ¤·¤¯¤Ï¥¨¥é¡¼¤Ê¤·¤Î Nan ¤È¤Ê¤ë¤Ù¤­¤Ç¤¢¤ë¡£
205 .\" FIXME . this bug occurs as at glibc 2.8.
206 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6779
207 .SH Îã
208 "remainder(29.0, 3.0)" ¤ò¸Æ¤Ó½Ð¤¹¤È \-1 ¤òÊÖ¤¹¡£
209 .SH ´ØÏ¢¹àÌÜ
210 .BR div (3),
211 .BR fmod (3),
212 .BR remquo (3)