OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 2008-08-11 "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 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
47 .I cc\ -std=c99
48 .ad b
49 .\"O .SH DESCRIPTION
50 .SH ÀâÌÀ
51 .\"O These functions compute the remainder and part of the quotient
52 .\"O upon division of
53 .\"O .I x
54 .\"O by
55 .\"O .IR y .
56 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
57 .I x
58 ¤ò
59 .I y
60 ¤Ç³ä¤Ã¤¿¤È¤­¤Î¾¦¤Î°ìÉô¤È¾ê;¤ò·×»»¤¹¤ë¡£
61 .\"O A few bits of the quotient are stored via the
62 .\"O .I quo
63 .\"O pointer.
64 .\"O The remainder is returned as the function result.
65 ¾¦¤Î¤¤¤¯¤Ä¤«¤Î¥Ó¥Ã¥È¤¬
66 .I quo
67 ¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤Æ³ÊǼ¤µ¤ì¤ë¡£
68 ¾ê;¤Ï´Ø¿ô¤Î·ë²Ì¤È¤·¤ÆÊÖ¤µ¤ì¤ë¡£
69
70 .\"O The value of the remainder is the same as that computed by the
71 .\"O .BR remainder (3)
72 .\"O function.
73 ¾ê;¤ÎÃͤÏ
74 .BR remainder (3)
75 ´Ø¿ô¤Ç·×»»¤µ¤ì¤ë¤â¤Î¤ÈƱ¤¸¤Ç¤¢¤ë¡£
76
77 .\"O The value stored via the
78 .\"O .I quo
79 .\"O pointer has the sign of
80 .\"O .IR "x\ /\ y"
81 .\"O and agrees with the quotient in at least the low order 3 bits.
82 .I quo
83 ¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤Æ³ÊǼ¤µ¤ì¤ëÃͤˤϡ¢
84 .I "x\ /\ y"
85 ¤ÎÉä¹æ¤ÈºÇÄã¤Ç¤â¾¦¤Î²¼°Ì 3 ¥Ó¥Ã¥È¤¬´Þ¤Þ¤ì¤ë¡£
86
87 .\"O For example, \fIremquo(29.0,\ 3.0)\fP returns \-1.0 and might store 2.
88 .\"O Note that the actual quotient might not fit in an integer.
89 ¤¿¤È¤¨¤Ð \fIremquo(29.0,\ 3.0)\fP ¤Ï \-1.0 ¤òÊÖ¤·¡¢
90 (ÌõÃí: quo ¤Î»Ø¤·¤Æ¤¤¤ë¤â¤Î¤Ë¤Ï) 2 ¤¬³ÊǼ¤µ¤ì¤ë¡£
91 ¼ÂºÝ¤Î¾¦¤¬À°¿ôÃͤˤʤé¤Ê¤¤ÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
92 .\"O .\" A possible application of this function might be the computation
93 .\"O .\" of sin(x). Compute remquo(x, pi/2, &quo) or so.
94 .\" ¤³¤Î´Ø¿ô¤òÍøÍѤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È¤·¤Æ¤Ï¡¢
95 .\" sin(x) ¤Î·×»»¤Ê¤É¤¬¤¢¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
96 .\" sin(x) ¤Ç¤Ï remquo(x, pi/2, &quo) ¤Ê¤É¤ò·×»»¤¹¤ë¡£
97 .\"
98 .\"O .\" glibc, UnixWare: return 3 bits
99 .\"O .\" MacOS 10: return 7 bits
100 .\" glibc, UnixWare: 3 ¥Ó¥Ã¥È¤òÊÖ¤¹¡£
101 .\" MacOS 10: 7 ¥Ó¥Ã¥È¤òÊÖ¤¹¡£
102 .\"O .SH RETURN VALUE
103 .SH ÊÖ¤êÃÍ
104 .\"O On success, these functions return the same value as
105 .\"O the analogous functions described in
106 .\"O .BR remainder (3).
107 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
108 .BR remainder (3)
109 ¤Ë½ñ¤«¤ì¤Æ¤¤¤ëƱÍͤδؿô¤ÈƱ¤¸ÃͤòÊÖ¤¹¡£
110
111 .\"O If
112 .\"O .I x
113 .\"O or
114 .\"O .I y
115 .\"O is a NaN, a NaN is returned.
116 .I x
117 ¤«
118 .I y
119 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
120
121 .\"O If
122 .\"O .I x
123 .\"O is an infinity,
124 .\"O and
125 .\"O .I y
126 .\"O is not a NaN,
127 .\"O a domain error occurs, and
128 .\"O a NaN is returned.
129 .I x
130 ¤¬Ìµ¸ÂÂç¤Ç
131 .I y
132 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢
133 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
134
135 .\"O If
136 .\"O .I y
137 .\"O is zero,
138 .\"O and
139 .\"O .I x
140 .\"O is not a NaN,
141 .\"O a domain error occurs, and
142 .\"O a NaN is returned.
143 .I y
144 ¤¬¥¼¥í¤Ç
145 .I x
146 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢
147 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
148 .\"O .SH ERRORS
149 .SH ¥¨¥é¡¼
150 .\"O See
151 .\"O .BR math_error (7)
152 .\"O for information on how to determine whether an error has occurred
153 .\"O when calling these functions.
154 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
155 .BR math_error (7)
156 ¤ò»²¾È¤Î¤³¤È¡£
157 .PP
158 .\"O The following errors can occur:
159 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
160 .TP
161 .\"O Domain error: \fIx\fP is an infinity or \fIy\fP is 0, \
162 .\"O and the other argument is not a NaN
163 Îΰ襨¥é¡¼ (domain error): \fIx\fP ¤¬Ìµ¸ÂÂ礫 \fIy\fP ¤¬ 0 ¤Ç¡¢ \
164 ¾¤Î°ú¤­¿ô¤¬ NaN ¤Ç¤Ê¤¤
165 .\" .I errno
166 .\" is set to
167 .\" .BR EDOM .
168 .\"O An invalid floating-point exception
169 .\"O .RB ( FE_INVALID )
170 .\"O is raised.
171 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
172 .RB ( FE_INVALID )
173 ¤¬¾å¤¬¤ë¡£
174 .PP
175 .\"O These functions do not set
176 .\"O .IR errno .
177 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
178 .I errno
179 ¤òÀßÄꤷ¤Ê¤¤¡£
180 .\" FIXME . Is it intentional that these functions do not set errno?
181 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6802
182 .\"O .SH VERSIONS
183 .SH ¥Ð¡¼¥¸¥ç¥ó
184 .\"O These functions first appeared in glibc in version 2.1.
185 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
186 .\"O .SH "CONFORMING TO"
187 .SH ½àµò
188 C99, POSIX.1-2001.
189 .\"O .SH "SEE ALSO"
190 .SH ´ØÏ¢¹àÌÜ
191 .BR fmod (3),
192 .BR logb (3),
193 .BR remainder (3)