OSDN Git Service

(split) Refine LDP man3/expm1.3.
[linuxjm/LDP_man-pages.git] / draft / man3 / erf.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 2002-07-27 by Walter Harms
31 .\"     (walter.harms@informatik.uni-oldenburg.de)
32 .\"
33 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
34 .\"       all rights reserved.
35 .\" Translated Mon Jan 20 20:17:40 JST 1997
36 .\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
37 .\" Updated Tue Aug  5 23:16:48 JST 2003
38 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\" Updated & Modified Tue Feb 15 04:46:24 JST 2005
40 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
41 .\"
42 .\"WORD:        complementary error function    ÁêÊä¸íº¹´Ø¿ô
43 .\"WORD:        subnormal       ÈóÀµµ¬²½¤Î
44 .\"
45 .TH ERF 3  2010-09-20 "GNU" "Linux Programmer's Manual"
46 .\"O .SH NAME
47 .SH Ì¾Á°
48 .\"O erf, erff, erfl, \- error function
49 erf, erff, erfl \- ¸íº¹´Ø¿ô
50 .\"O .SH SYNOPSIS
51 .SH ½ñ¼°
52 .nf
53 .B #include <math.h>
54
55 .BI "double erf(double " x );
56 .BI "float erff(float " x );
57 .BI "long double erfl(long double " x );
58
59 .fi
60 .\"O Link with \fI\-lm\fP.
61 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
62 .sp
63 .in -4n
64 .\"O Feature Test Macro Requirements for glibc (see
65 .\"O .BR feature_test_macros (7)):
66 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
67 .RB ( feature_test_macros (7)
68 »²¾È):
69 .in
70 .sp
71 .ad l
72 .BR erf ():
73 .RS 4
74 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE ||
75 _POSIX_C_SOURCE\ >=\ 200112L;
76 .br
77 or
78 .I cc\ -std=c99
79 .RE
80 .br
81 .BR erff (),
82 .BR erfl ():
83 .RS 4
84 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
85 _POSIX_C_SOURCE\ >=\ 200112L;
86 .br
87 or
88 .I cc\ -std=c99
89 .RE
90 .ad b
91 .\"O .SH DESCRIPTION
92 .SH ÀâÌÀ
93 .\"O The
94 .\"O .BR erf ()
95 .\"O function returns the error function of \fIx\fP, defined
96 .\"O as
97 .BR erf ()
98 ¤Ï \fIx\fP ¤Î¸íº¹´Ø¿ô¤òÊÖ¤¹´Ø¿ô¤Ç¡¢°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
99 .TP
100     erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(\-t*t) dt
101 .\"O .SH RETURN VALUE
102 .SH ÊÖ¤êÃÍ
103 .\"O On success, these functions return the error function of
104 .\"O .IR x ,
105 .\"O a value in the range [\-1,\ 1].
106 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
107 .I x
108 ¤Î¸íº¹´Ø¿ô¤òÊÖ¤¹¡£
109 ÊÖ¤êÃͤϠ[\-1,\ 1] ¤ÎÈϰϤȤʤ롣
110
111 .\"O If
112 .\"O .I x
113 .\"O is a NaN, a NaN is returned.
114 .I x
115 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
116
117 .\"O If
118 .\"O .I x
119 .\"O is +0 (\-0), +0 (\-0) is returned.
120 .I x
121 ¤¬ +0 (\-0) ¤Î¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
122
123 .\"O If
124 .\"O .I x
125 .\"O is positive infinity (negative infinity),
126 .\"O +1 (\-1) is returned.
127 .I x
128 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Î¾ì¹ç¡¢+1 (\-1) ¤¬ÊÖ¤µ¤ì¤ë¡£
129
130 .\"O If
131 .\"O .I x
132 .\"O is subnormal,
133 .\"O a range error occurs,
134 .\"O and the return value is 2*x/sqrt(pi).
135 .I x
136 ¤¬ÈóÀµµ¬²½¿ô¤Î¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
137 ÊÖ¤êÃͤϠ2*x/sqrt(pi) ¤È¤Ê¤ë¡£
138 .\"O .SH ERRORS
139 .SH ¥¨¥é¡¼
140 .\"O See
141 .\"O .BR math_error (7)
142 .\"O for information on how to determine whether an error has occurred
143 .\"O when calling these functions.
144 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
145 .BR math_error (7)
146 ¤ò»²¾È¤Î¤³¤È¡£
147 .PP
148 .\"O The following errors can occur:
149 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
150 .TP
151 .\"O Range error: result underflow (\fIx\fP is subnormal)
152 ÈÏ°Ï¥¨¥é¡¼ (range error): ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¹¤ë (\fIx\fP ¤¬ÈóÀµµ¬²½¿ô)
153 .\" .I errno
154 .\" is set to
155 .\" .BR ERANGE .
156 .\"O An underflow floating-point exception
157 .\"O .RB ( FE_UNDERFLOW )
158 .\"O is raised.
159 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
160 .RB ( FE_UNDERFLOW )
161 ¤¬¾å¤¬¤ë¡£
162 .PP
163 .\"O These functions do not set
164 .\"O .IR errno .
165 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
166 .I errno
167 ¤òÀßÄꤷ¤Ê¤¤¡£
168 .\" FIXME . Is it intentional that these functions do not set errno?
169 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785
170 .\"O .SH "CONFORMING TO"
171 .SH ½àµò
172 C99, POSIX.1-2001.
173 .\"O The variant returning
174 .\"O .I double
175 .\"O also conforms to
176 .\"O SVr4, 4.3BSD.
177 .I double
178 ÈǤδؿô¤Ï SVr4, 4.3BSD ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
179 .\"O .SH "SEE ALSO"
180 .SH ´ØÏ¢¹àÌÜ
181 .BR cerf (3),
182 .BR erfc (3),
183 .BR exp (3)