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
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>
14 .TH REMQUO 3 2010-09-20 "GNU" "Linux Programmer's Manual"
17 .\"O remquo, remquof, remquol \- remainder and part of quotient
18 remquo, remquof, remquol \- ¾¦¤Î°ìÉô¤È¾ê;¤òµá¤á¤ë
24 .BI "double remquo(double " x ", double " y ", int *" quo );
26 .BI "float remquof(float " x ", float " y ", int *" quo );
28 .BI "long double remquol(long double " x ", long double " y ", int *" quo );
31 .\"O Link with \fI\-lm\fP.
32 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
35 .\"O Feature Test Macro Requirements for glibc (see
36 .\"O .BR feature_test_macros (7)):
37 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
38 .RB ( feature_test_macros (7)
47 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
48 _POSIX_C_SOURCE\ >=\ 200112L;
56 .\"O These functions compute the remainder and part of the quotient
65 ¤Ç³ä¤Ã¤¿¤È¤¤Î¾¦¤Î°ìÉô¤È¾ê;¤ò·×»»¤¹¤ë¡£
66 .\"O A few bits of the quotient are stored via the
69 .\"O The remainder is returned as the function result.
70 ¾¦¤Î¤¤¤¯¤Ä¤«¤Î¥Ó¥Ã¥È¤¬
72 ¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤Æ³ÊǼ¤µ¤ì¤ë¡£
73 ¾ê;¤Ï´Ø¿ô¤Î·ë²Ì¤È¤·¤ÆÊÖ¤µ¤ì¤ë¡£
75 .\"O The value of the remainder is the same as that computed by the
76 .\"O .BR remainder (3)
80 ´Ø¿ô¤Ç·×»»¤µ¤ì¤ë¤â¤Î¤ÈƱ¤¸¤Ç¤¢¤ë¡£
82 .\"O The value stored via the
84 .\"O pointer has the sign of
86 .\"O and agrees with the quotient in at least the low order 3 bits.
88 ¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤Æ³ÊǼ¤µ¤ì¤ëÃͤˤϡ¢
90 ¤ÎÉä¹æ¤ÈºÇÄã¤Ç¤â¾¦¤Î²¼°Ì 3 ¥Ó¥Ã¥È¤¬´Þ¤Þ¤ì¤ë¡£
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) ¤Ê¤É¤ò·×»»¤¹¤ë¡£
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
109 .\"O On success, these functions return the same value as
110 .\"O the analogous functions described in
111 .\"O .BR remainder (3).
112 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
114 ¤Ë½ñ¤«¤ì¤Æ¤¤¤ëƱÍͤδؿô¤ÈƱ¤¸ÃͤòÊÖ¤¹¡£
120 .\"O is a NaN, a NaN is returned.
124 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
132 .\"O a domain error occurs, and
133 .\"O a NaN is returned.
138 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
146 .\"O a domain error occurs, and
147 .\"O a NaN is returned.
152 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
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 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
163 .\"O The following errors can occur:
164 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¡£
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 ¤Ç¤Ê¤¤
173 .\"O An invalid floating-point exception
174 .\"O .RB ( FE_INVALID )
176 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
180 .\"O These functions do not set
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
189 .\"O These functions first appeared in glibc in version 2.1.
190 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
191 .\"O .SH "CONFORMING TO"