OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 2009-02-04 "" "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 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _ISOC99_SOURCE; or
71 .I cc\ -std=c99
72 .br
73 .BR remainderf (),
74 .BR remainderl ():
75 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
76 .I cc\ -std=c99
77 .br
78 .BR drem (),
79 .BR dremf (),
80 .BR dreml ():
81 _SVID_SOURCE || _BSD_SOURCE
82 .ad b
83 .SH ÀâÌÀ
84 .BR remainder ()
85 ´Ø¿ô¤Ï
86 .I x
87 ¤ò
88 .I y
89 ¤Ç³ä¤Ã¤¿Í¾¤ê¤ò·×»»¤¹¤ë¡£
90 ÊÖ¤êÃͤÏ
91 \fIx\fP\-\fIn\fP*\fIy\fP
92 ¤Ç¤¢¤ë¡£
93 ¤³¤³¤Ç
94 .I n
95 ¤Ï
96 .I "x\ /\ y"
97 ¤ÎÃͤòºÇ¤â¶á¤¤À°¿ô¤Ë´Ý¤á¤¿¤â¤Î¤Ç¤¢¤ë¡£
98 \fIx\fP\-\fIn\fP*\fIy\fP
99 ¤ÎÀäÂÐÃͤ¬ 0.5 ¤Î¾ì¹ç¡¢¶ö¿ô¤Ë¤Ê¤ë¤è¤¦¤Ë
100 .I n
101 ¤¬Áª¤Ð¤ì¤ë¡£
102
103 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¸½ºß¤Î´Ý¤á¥â¡¼¥É¤Î±Æ¶Á¤ò¼õ¤±¤Ê¤¤ (´Ý¤á¥â¡¼¥É¤Ë¤Ä¤¤¤Æ¤Ï
104 .BR fenv (3)
105 ¤ò»²¾È)¡£
106 .LP
107 .BR drem ()
108 ´Ø¿ô¤Ï¤³¤ì¤ÈÁ´¤¯Æ±¤¸Æ°ºî¤ò¤¹¤ë¡£
109 .SH ÊÖ¤êÃÍ
110 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤ÏÉâÆ°¾®¿ôÅÀ¤Î¾ê; \fIx\fP\-\fIn\fP*\fIy\fP ¤òÊÖ¤¹¡£
111 ÊÖ¤êÃͤ¬ 0 ¤Î¾ì¹ç¡¢¤½¤ÎÉä¹æ¤Ï
112 .I x
113 ¤ÈƱ¤¸¤Ë¤Ê¤ë¡£
114
115 .I x
116 ¤«
117 .I y
118 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
119
120 .I x
121 ¤¬Ìµ¸ÂÂç¤Ç
122 .I y
123 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢
124 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
125
126 .\" FIXME . Instead, glibc gives a domain error even if x is a NaN
127 .\" Interestingly, remquo(3) does not have the same problem.
128 .I y
129 ¤¬¥¼¥í¤Ç
130 .I x
131 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢
132 Îΰ襨¥é¡¼¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
133 .SH ¥¨¥é¡¼
134 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
135 .BR math_error (7)
136 ¤ò»²¾È¤Î¤³¤È¡£
137 .PP
138 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
139 .TP
140 Îΰ襨¥é¡¼ (domain error): \fIx\fP ¤¬Ìµ¸ÂÂç¤Ç \fIy\fP ¤¬ NaN ¤Ç¤Ï¤Ê¤¤
141 .\" .I errno
142 .\" is set to
143 .\" .BR EDOM .
144 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
145 .RB ( FE_INVALID )
146 ¤¬¾å¤¬¤ë¡£
147 .IP
148 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¤³¤Î¾ì¹ç¤Ë
149 .I errno
150 ¤òÀßÄꤷ¤Ê¤¤¡£
151 .\" FIXME . Is it intentional that these functions do not set errno?
152 .\" They do set errno for the y == 0 case, below.
153 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6783
154 .TP
155 Îΰ襨¥é¡¼: \fIy\fP ¤¬¥¼¥í¤Ç \fIx\fP ¤¬ NaN ¤Ç¤Ï¤Ê¤¤ (²¼µ­¤Î¡Ö¥Ð¥°¡×»²¾È)
156 .I errno
157 ¤Ë
158 .B EDOM
159 ¤¬ÀßÄꤵ¤ì¤ë¡£
160 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
161 .RB ( FE_INVALID )
162 ¤¬¾å¤¬¤ë¡£
163 .SH ½àµò
164 .\" IEC 60559.
165 ´Ø¿ô
166 .BR remainder (),
167 .BR remainderf (),
168 .BR remainderl ()
169 ¤Ï C99 ¤È POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
170
171 ´Ø¿ô
172 .BR drem ()
173 ¤Ï 4.3BSD ¤ËͳÍ褹¤ë¡£
174 .I float
175 ¤È
176 .I "long double"
177 ÈǤÎ
178 .BR dremf ()
179 ¤È
180 .BR dreml ()
181 ¤Ï¡¢Tru64 ¤ä glibc2 ¤Î¤è¤¦¤Ê¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ë¸ºß¤¹¤ë¡£
182 ¤³¤ì¤é¤Î´Ø¿ô¤Î»ÈÍѤÏÈò¤±¤Æ¡¢
183 .BR remainder ()
184 ¤Ê¤É¤ò»ÈÍѤ¹¤ë¤³¤È¡£
185 .SH ¥Ð¥°
186
187     remainder(nan(""), 0);
188
189 ¤Î¸Æ¤Ó½Ð¤·¤ò¹Ô¤¦¤È¡¢´üÂÔÄ̤ê Nan ¤¬Ê֤뤬¡¢¸í¤Ã¤ÆÎΰ襨¥é¡¼¤¬È¯À¸¤¹¤ë¡£
190 Àµ¤·¤¯¤Ï¥¨¥é¡¼¤Ê¤·¤Î Nan ¤È¤Ê¤ë¤Ù¤­¤Ç¤¢¤ë¡£
191 .\" FIXME . this bug occurs as at glibc 2.8.
192 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6779
193 .SH Îã
194 "remainder(29.0, 3.0)" ¤ò¸Æ¤Ó½Ð¤¹¤È \-1 ¤òÊÖ¤¹¡£
195 .SH ´ØÏ¢¹àÌÜ
196 .BR div (3),
197 .BR fmod (3),
198 .BR remquo (3)