OSDN Git Service

(split) Fixed #25191 (typo in fenv.3).
[linuxjm/LDP_man-pages.git] / release / man3 / fma.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, 2002-07-27 Walter Harms
5 .\" Modified 2004-11-15, Added further text on FLT_ROUNDS
6 .\"     as suggested by AEB and Fabian Kreutz
7 .\"
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>
14 .\"
15 .TH FMA 3  2010-09-20 "" "Linux Programmer's Manual"
16 .SH Ì¾Á°
17 fma, fmaf, fmal \- ÉâÆ°¾®¿ôÅÀ¿ô¤ÎÀѤÈϤò·×»»¤¹¤ë
18 .SH ½ñ¼°
19 .nf
20 .B #include <math.h>
21 .sp
22 .BI "double fma(double " x ", double " y ", double " z );
23 .br
24 .BI "float fmaf(float " x ", float " y ", float " z );
25 .br
26 .BI "long double fmal(long double " x ", long double " y ", long double " z );
27 .fi
28 .sp
29 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
30 .sp
31 .in -4n
32 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
33 .RB ( feature_test_macros (7)
34 »²¾È):
35 .in
36 .sp
37 .ad l
38 .BR fma (),
39 .BR fmaf (),
40 .BR fmal ():
41 .RS 4
42 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
43 _POSIX_C_SOURCE\ >=\ 200112L;
44 .br
45 or
46 .I cc\ -std=c99
47 .RE
48 .ad
49 .SH ÀâÌÀ
50 .BR fma ()
51 ´Ø¿ô¤Ï
52 .IR x " * " y " + " z
53 ¤ò·×»»¤¹¤ë¡£
54 ·ë²Ì¤Ï¡¢°ì¤Ä¤Î»°¹à±é»»¤È¤·¤Æ¸½ºß¤Î´Ý¤á¥â¡¼¥É¤Ë¤·¤¿¤¬¤Ã¤Æ´Ý¤á¤é¤ì¤ë
55 .RB ( fenv (3)
56 »²¾È)¡£
57 .SH ÊÖ¤êÃÍ
58 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
59 .IR x " * " y " + " z
60 ¤Î¡¢°ì¤Ä¤Î»°¹à±é»»¤È¤·¤Æ´Ý¤á¤é¤ì¤¿ÃͤòÊÖ¤¹¡£
61
62 .I x
63 ¤«
64 .I y
65 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
66
67 .I y
68 ¤Î
69 .I x
70 Çܤ¬¤Á¤ç¤¦¤É̵¸ÂÂç¤Ç¡¢
71 .I z
72 ¤¬¤½¤ì¤È¤ÏÈ¿ÂФÎÉä¹æ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢
73 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
74
75 .\" POSIX.1-2008 allows some possible differences for the following two
76 .\" domain error cases, but on Linux they are treated the same (AFAICS).
77 .\" Nevertheless, we'll mirror POSIX.1 and describe the two cases
78 .\" separately.
79 .I x
80 ¤È
81 .I y
82 ¤Î¤¦¤Á°ìÊý¤¬Ìµ¸ÂÂç¤Ç¡¢¤â¤¦°ìÊý¤¬ 0 ¤Ç¡¢
83 .I z
84 ¤¬ NaN ¤Ç¤Ê¤¤¾ì¹ç¡¢Îΰ襨¥é¡¼¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
85 .\" POSIX.1 says that a NaN or an implementation-defined value shall
86 .\" be returned for this case.
87
88 .\" POSIX.1 makes the domain error optional for this case.
89 .I x
90 ¤È
91 .I y
92 ¤Î¤¦¤Á°ìÊý¤¬Ìµ¸ÂÂç¤Ç¡¢¤â¤¦°ìÊý¤¬ 0 ¤Ç¡¢
93 .I z
94 ¤¬ NaN ¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼¤¬È¯À¸¤·¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
95
96 .I y
97 ¤Î
98 .I x
99 Çܤ¬ 0 ¤Î̵¸ÂÂçÇÜ (¤â¤·¤¯¤Ï¤½¤ÎµÕ) ¤Ç¤Ï¤Ê¤¯¡¢
100 .I z
101 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
102
103 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
104 Àµ¤·¤¤Éä¹æ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
105
106 ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢
107 ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢Éä¹æÉÕ¤­¤Î 0 ¤¬ÊÖ¤µ¤ì¤ë¡£
108 .SH ¥¨¥é¡¼
109 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
110 .BR math_error (7)
111 ¤ò»²¾È¤Î¤³¤È¡£
112 .PP
113 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
114 .TP
115 Îΰ襨¥é¡¼: \fIx\fP * \fIy\fP + \fIz\fP ¤« \
116 \fIx\fP * \fIy\fP ¤¬Ìµ¸ú¤Ç¡¢\fIz\fP ¤¬ NaN ¤Ç¤Ï¤Ê¤¤
117 .\" .I errno
118 .\" is set to
119 .\" .BR EDOM .
120 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
121 .RB ( FE_INVALID )
122 ¤¬¾å¤¬¤ë¡£
123 .TP
124 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
125 .\" .I errno
126 .\" is set to
127 .\" .BR ERANGE .
128 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
129 .RB ( FE_OVERFLOW )
130 ¤¬¾å¤¬¤ë¡£
131 .TP
132 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥¢¥ó¥À¡¼¥Õ¥í¡¼
133 .\" .I errno
134 .\" is set to
135 .\" .BR ERANGE .
136 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
137 .RB ( FE_UNDERFLOW )
138 ¤¬¾å¤¬¤ë¡£
139 .PP
140 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
141 .I errno
142 ¤òÀßÄꤷ¤Ê¤¤¡£
143 .\" FIXME . Is it intentional that these functions do not set errno?
144 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6801
145 .SH ¥Ð¡¼¥¸¥ç¥ó
146 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
147 .SH ½àµò
148 C99, POSIX.1-2001.
149 .SH ´ØÏ¢¹àÌÜ
150 .BR remainder (3),
151 .BR remquo (3)