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, 2002-07-27 Walter Harms
5 .\" Modified 2004-11-15, Added further text on FLT_ROUNDS
6 .\" as suggested by AEB and Fabian Kreutz
8 .\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
9 .\" and Copyright (c) 2008 Akihiro MOTOKI
10 .\" Translated Sat Jul 24 10:37:53 JST 2004
11 .\" by Yuichi SATO <ysato444@yahoo.co.jp>
12 .\" Updated & Modified Mon Jan 10 09:11:49 JST 2005 by Yuichi SATO
13 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
15 .TH FMA 3 2010-09-20 "" "Linux Programmer's Manual"
18 .\"O fma, fmaf, fmal \- floating-point multiply and add
19 fma, fmaf, fmal \- ÉâÆ°¾®¿ôÅÀ¿ô¤ÎÀѤÈϤò·×»»¤¹¤ë
25 .BI "double fma(double " x ", double " y ", double " z );
27 .BI "float fmaf(float " x ", float " y ", float " z );
29 .BI "long double fmal(long double " x ", long double " y ", long double " z );
32 .\"O Link with \fI\-lm\fP.
33 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
36 .\"O Feature Test Macro Requirements for glibc (see
37 .\"O .BR feature_test_macros (7)):
38 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
39 .RB ( feature_test_macros (7)
48 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
49 _POSIX_C_SOURCE\ >=\ 200112L;
59 .\"O function computes
60 .\"O .IR x " * " y " + " z .
65 .\"O The result is rounded as one ternary operation according to the
66 .\"O current rounding mode (see
68 ·ë²Ì¤Ï¡¢°ì¤Ä¤Î»°¹à±é»»¤È¤·¤Æ¸½ºß¤Î´Ý¤á¥â¡¼¥É¤Ë¤·¤¿¤¬¤Ã¤Æ´Ý¤á¤é¤ì¤ë
73 .\"O These functions return the value of
74 .\"O .IR x " * " y " + " z ,
75 .\"O rounded as one ternary operation.
78 ¤Î¡¢°ì¤Ä¤Î»°¹à±é»»¤È¤·¤Æ´Ý¤á¤é¤ì¤¿ÃͤòÊÖ¤¹¡£
84 .\"O is a NaN, a NaN is returned.
88 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
94 .\"O is an exact infinity, and
96 .\"O is an infinity with the opposite sign,
97 .\"O a domain error occurs,
98 .\"O and a NaN is returned.
102 Çܤ¬¤Á¤ç¤¦¤É̵¸ÂÂç¤Ç¡¢
104 ¤¬¤½¤ì¤È¤ÏÈ¿ÂФÎÉä¹æ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢
105 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
107 .\" POSIX.1-2008 allows some possible differences for the following two
108 .\" domain error cases, but on Linux they are treated the same (AFAICS).
109 .\" Nevertheless, we'll mirror POSIX.1 and describe the two cases
115 .\"O is an infinity, the other is 0, and
118 .\"O a domain error occurs, and
119 .\"O a NaN is returned.
123 ¤Î¤¦¤Á°ìÊý¤¬Ìµ¸ÂÂç¤Ç¡¢¤â¤¦°ìÊý¤¬ 0 ¤Ç¡¢
125 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢Îΰ襨¥é¡¼¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
126 .\" POSIX.1 says that a NaN or an implementation-defined value shall
127 .\" be returned for this case.
133 .\"O is an infinity, and the other is 0, and
136 .\" POSIX.1 makes the domain error optional for this case.
137 .\"O a domain error occurs, and
138 .\"O a NaN is returned.
142 ¤Î¤¦¤Á°ìÊý¤¬Ìµ¸ÂÂç¤Ç¡¢¤â¤¦°ìÊý¤¬ 0 ¤Ç¡¢
144 ¤¬ NaN ¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
150 .\"O is not an infinity times zero (or vice versa), and
153 .\"O a NaN is returned.
157 Çܤ¬ 0 ¤Î̵¸ÂÂçÇÜ (¤â¤·¤¯¤Ï¤½¤ÎµÕ) ¤Ç¤Ï¤Ê¤¯¡¢
159 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
161 .\"O If the result overflows,
162 .\"O a range error occurs, and
163 .\"O an infinity with the correct sign is returned.
164 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
165 Àµ¤·¤¤Éä¹æ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
167 .\"O If the result underflows,
168 .\"O a range error occurs, and
169 .\"O a signed 0 is returned.
170 ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢
171 ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢Éä¹æÉÕ¤¤Î 0 ¤¬ÊÖ¤µ¤ì¤ë¡£
175 .\"O .BR math_error (7)
176 .\"O for information on how to determine whether an error has occurred
177 .\"O when calling these functions.
178 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
182 .\"O The following errors can occur:
183 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¡£
185 .\"O Domain error: \fIx\fP * \fIy\fP + \fIz\fP, \
186 .\"O or \fIx\fP * \fIy\fP is invalid and \fIz\fP is not a NaN
187 Îΰ襨¥é¡¼: \fIx\fP * \fIy\fP + \fIz\fP ¤« \
188 \fIx\fP * \fIy\fP ¤¬Ìµ¸ú¤Ç¡¢\fIz\fP ¤¬ NaN ¤Ç¤Ï¤Ê¤¤
192 .\"O An invalid floating-point exception
193 .\"O .RB ( FE_INVALID )
195 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
199 .\"O Range error: result overflow
200 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
204 .\"O An overflow floating-point exception
205 .\"O .RB ( FE_OVERFLOW )
207 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
211 .\"O Range error: result underflow
212 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥¢¥ó¥À¡¼¥Õ¥í¡¼
216 .\"O An underflow floating-point exception
217 .\"O .RB ( FE_UNDERFLOW )
219 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
223 .\"O These functions do not set
228 .\" FIXME . Is it intentional that these functions do not set errno?
229 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6801
232 .\"O These functions first appeared in glibc in version 2.1.
233 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
234 .\"O .SH "CONFORMING TO"