OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / draft / man3 / remquo.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\" Distributed under GPL
5 .\" based on glibc infopages
6 .\" polished, aeb
7 .\"
8 .\" Japanese Version Copyright (c) 2005 Yuichi SATO
9 .\" and Copyright (c) 2008 Akihiro MOTOKI
10 .\" Translated Tue Feb  1 06:39:08 JST 2005
11 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
12 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
13 .\"
14 .TH REMQUO 3 2010-09-20 "GNU" "Linux Programmer's Manual"
15 .\"O .SH NAME
16 .SH Ì¾Á°
17 .\"O remquo, remquof, remquol \- remainder and part of quotient
18 remquo, remquof, remquol \- ¾¦¤Î°ìÉô¤È¾ê;¤òµá¤á¤ë
19 .\"O .SH SYNOPSIS
20 .SH ½ñ¼°
21 .nf
22 .B #include <math.h>
23 .sp
24 .BI "double remquo(double " x ", double " y ", int *" quo );
25 .br
26 .BI "float remquof(float " x ", float " y ", int *" quo );
27 .br
28 .BI "long double remquol(long double " x ", long double " y ", int *" quo );
29 .fi
30 .sp
31 .\"O Link with \fI\-lm\fP.
32 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
33 .sp
34 .in -4n
35 .\"O Feature Test Macro Requirements for glibc (see
36 .\"O .BR feature_test_macros (7)):
37 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
38 .RB ( feature_test_macros (7)
39 »²¾È):
40 .in
41 .sp
42 .ad l
43 .BR remquo (),
44 .BR remquof (),
45 .BR remquol ():
46 .RS 4
47 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
48 _POSIX_C_SOURCE\ >=\ 200112L;
49 .br
50 or
51 .I cc\ -std=c99
52 .RE
53 .ad
54 .\"O .SH DESCRIPTION
55 .SH ÀâÌÀ
56 .\"O These functions compute the remainder and part of the quotient
57 .\"O upon division of
58 .\"O .I x
59 .\"O by
60 .\"O .IR y .
61 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
62 .I x
63 ¤ò
64 .I y
65 ¤Ç³ä¤Ã¤¿¤È¤­¤Î¾¦¤Î°ìÉô¤È¾ê;¤ò·×»»¤¹¤ë¡£
66 .\"O A few bits of the quotient are stored via the
67 .\"O .I quo
68 .\"O pointer.
69 .\"O The remainder is returned as the function result.
70 ¾¦¤Î¤¤¤¯¤Ä¤«¤Î¥Ó¥Ã¥È¤¬
71 .I quo
72 ¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤Æ³ÊǼ¤µ¤ì¤ë¡£
73 ¾ê;¤Ï´Ø¿ô¤Î·ë²Ì¤È¤·¤ÆÊÖ¤µ¤ì¤ë¡£
74
75 .\"O The value of the remainder is the same as that computed by the
76 .\"O .BR remainder (3)
77 .\"O function.
78 ¾ê;¤ÎÃͤÏ
79 .BR remainder (3)
80 ´Ø¿ô¤Ç·×»»¤µ¤ì¤ë¤â¤Î¤ÈƱ¤¸¤Ç¤¢¤ë¡£
81
82 .\"O The value stored via the
83 .\"O .I quo
84 .\"O pointer has the sign of
85 .\"O .IR "x\ /\ y"
86 .\"O and agrees with the quotient in at least the low order 3 bits.
87 .I quo
88 ¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤Æ³ÊǼ¤µ¤ì¤ëÃͤˤϡ¢
89 .I "x\ /\ y"
90 ¤ÎÉä¹æ¤ÈºÇÄã¤Ç¤â¾¦¤Î²¼°Ì 3 ¥Ó¥Ã¥È¤¬´Þ¤Þ¤ì¤ë¡£
91
92 .\"O For example, \fIremquo(29.0,\ 3.0)\fP returns \-1.0 and might store 2.
93 .\"O Note that the actual quotient might not fit in an integer.
94 ¤¿¤È¤¨¤Ð \fIremquo(29.0,\ 3.0)\fP ¤Ï \-1.0 ¤òÊÖ¤·¡¢
95 (ÌõÃí: quo ¤Î»Ø¤·¤Æ¤¤¤ë¤â¤Î¤Ë¤Ï) 2 ¤¬³ÊǼ¤µ¤ì¤ë¡£
96 ¼ÂºÝ¤Î¾¦¤¬À°¿ôÃͤˤʤé¤Ê¤¤ÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
97 .\"O .\" A possible application of this function might be the computation
98 .\"O .\" of sin(x). Compute remquo(x, pi/2, &quo) or so.
99 .\" ¤³¤Î´Ø¿ô¤òÍøÍѤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È¤·¤Æ¤Ï¡¢
100 .\" sin(x) ¤Î·×»»¤Ê¤É¤¬¤¢¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
101 .\" sin(x) ¤Ç¤Ï remquo(x, pi/2, &quo) ¤Ê¤É¤ò·×»»¤¹¤ë¡£
102 .\"
103 .\"O .\" glibc, UnixWare: return 3 bits
104 .\"O .\" MacOS 10: return 7 bits
105 .\" glibc, UnixWare: 3 ¥Ó¥Ã¥È¤òÊÖ¤¹¡£
106 .\" MacOS 10: 7 ¥Ó¥Ã¥È¤òÊÖ¤¹¡£
107 .\"O .SH RETURN VALUE
108 .SH ÊÖ¤êÃÍ
109 .\"O On success, these functions return the same value as
110 .\"O the analogous functions described in
111 .\"O .BR remainder (3).
112 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
113 .BR remainder (3)
114 ¤Ë½ñ¤«¤ì¤Æ¤¤¤ëƱÍͤδؿô¤ÈƱ¤¸ÃͤòÊÖ¤¹¡£
115
116 .\"O If
117 .\"O .I x
118 .\"O or
119 .\"O .I y
120 .\"O is a NaN, a NaN is returned.
121 .I x
122 ¤«
123 .I y
124 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
125
126 .\"O If
127 .\"O .I x
128 .\"O is an infinity,
129 .\"O and
130 .\"O .I y
131 .\"O is not a NaN,
132 .\"O a domain error occurs, and
133 .\"O a NaN is returned.
134 .I x
135 ¤¬Ìµ¸ÂÂç¤Ç
136 .I y
137 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢
138 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
139
140 .\"O If
141 .\"O .I y
142 .\"O is zero,
143 .\"O and
144 .\"O .I x
145 .\"O is not a NaN,
146 .\"O a domain error occurs, and
147 .\"O a NaN is returned.
148 .I y
149 ¤¬¥¼¥í¤Ç
150 .I x
151 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢
152 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
153 .\"O .SH ERRORS
154 .SH ¥¨¥é¡¼
155 .\"O See
156 .\"O .BR math_error (7)
157 .\"O for information on how to determine whether an error has occurred
158 .\"O when calling these functions.
159 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
160 .BR math_error (7)
161 ¤ò»²¾È¤Î¤³¤È¡£
162 .PP
163 .\"O The following errors can occur:
164 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
165 .TP
166 .\"O Domain error: \fIx\fP is an infinity or \fIy\fP is 0, \
167 .\"O and the other argument is not a NaN
168 Îΰ襨¥é¡¼ (domain error): \fIx\fP ¤¬Ìµ¸ÂÂ礫 \fIy\fP ¤¬ 0 ¤Ç¡¢ \
169 ¾¤Î°ú¤­¿ô¤¬ NaN ¤Ç¤Ê¤¤
170 .\" .I errno
171 .\" is set to
172 .\" .BR EDOM .
173 .\"O An invalid floating-point exception
174 .\"O .RB ( FE_INVALID )
175 .\"O is raised.
176 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
177 .RB ( FE_INVALID )
178 ¤¬¾å¤¬¤ë¡£
179 .PP
180 .\"O These functions do not set
181 .\"O .IR errno .
182 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
183 .I errno
184 ¤òÀßÄꤷ¤Ê¤¤¡£
185 .\" FIXME . Is it intentional that these functions do not set errno?
186 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6802
187 .\"O .SH VERSIONS
188 .SH ¥Ð¡¼¥¸¥ç¥ó
189 .\"O These functions first appeared in glibc in version 2.1.
190 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
191 .\"O .SH "CONFORMING TO"
192 .SH ½àµò
193 C99, POSIX.1-2001.
194 .\"O .SH "SEE ALSO"
195 .SH ´ØÏ¢¹àÌÜ
196 .BR fmod (3),
197 .BR logb (3),
198 .BR remainder (3)