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 2008-08-11 "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)
46 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
51 .\"O These functions compute the remainder and part of the quotient
60 ¤Ç³ä¤Ã¤¿¤È¤¤Î¾¦¤Î°ìÉô¤È¾ê;¤ò·×»»¤¹¤ë¡£
61 .\"O A few bits of the quotient are stored via the
64 .\"O The remainder is returned as the function result.
65 ¾¦¤Î¤¤¤¯¤Ä¤«¤Î¥Ó¥Ã¥È¤¬
67 ¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤Æ³ÊǼ¤µ¤ì¤ë¡£
68 ¾ê;¤Ï´Ø¿ô¤Î·ë²Ì¤È¤·¤ÆÊÖ¤µ¤ì¤ë¡£
70 .\"O The value of the remainder is the same as that computed by the
71 .\"O .BR remainder (3)
75 ´Ø¿ô¤Ç·×»»¤µ¤ì¤ë¤â¤Î¤ÈƱ¤¸¤Ç¤¢¤ë¡£
77 .\"O The value stored via the
79 .\"O pointer has the sign of
81 .\"O and agrees with the quotient in at least the low order 3 bits.
83 ¥Ý¥¤¥ó¥¿¤ò»È¤Ã¤Æ³ÊǼ¤µ¤ì¤ëÃͤˤϡ¢
85 ¤ÎÉä¹æ¤ÈºÇÄã¤Ç¤â¾¦¤Î²¼°Ì 3 ¥Ó¥Ã¥È¤¬´Þ¤Þ¤ì¤ë¡£
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) ¤Ê¤É¤ò·×»»¤¹¤ë¡£
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
104 .\"O On success, these functions return the same value as
105 .\"O the analogous functions described in
106 .\"O .BR remainder (3).
107 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
109 ¤Ë½ñ¤«¤ì¤Æ¤¤¤ëƱÍͤδؿô¤ÈƱ¤¸ÃͤòÊÖ¤¹¡£
115 .\"O is a NaN, a NaN is returned.
119 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
127 .\"O a domain error occurs, and
128 .\"O a NaN is returned.
133 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
141 .\"O a domain error occurs, and
142 .\"O a NaN is returned.
147 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
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 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
158 .\"O The following errors can occur:
159 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¡£
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 ¤Ç¤Ê¤¤
168 .\"O An invalid floating-point exception
169 .\"O .RB ( FE_INVALID )
171 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
175 .\"O These functions do not set
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
184 .\"O These functions first appeared in glibc in version 2.1.
185 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
186 .\"O .SH "CONFORMING TO"