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>
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.
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.
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
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" References consulted:
26 .\" Linux libc source code
27 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
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)
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>
42 .\"WORD: complementary error function 相補誤差関数
43 .\"WORD: subnormal 非正規化の
45 .TH ERF 3 2010-09-20 "GNU" "Linux Programmer's Manual"
48 .\"O erf, erff, erfl, \- error function
49 erf, erff, erfl \- 誤差関数
55 .BI "double erf(double " x );
56 .BI "float erff(float " x );
57 .BI "long double erfl(long double " x );
60 .\"O Link with \fI\-lm\fP.
64 .\"O Feature Test Macro Requirements for glibc (see
65 .\"O .BR feature_test_macros (7)):
67 .RB ( feature_test_macros (7)
74 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE ||
75 _POSIX_C_SOURCE\ >=\ 200112L;
84 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
85 _POSIX_C_SOURCE\ >=\ 200112L;
95 .\"O function returns the error function of \fIx\fP, defined
98 は \fIx\fP の誤差関数を返す関数で、以下のように定義されている。
100 erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(\-t*t) dt
101 .\"O .SH RETURN VALUE
103 .\"O On success, these functions return the error function of
105 .\"O a value in the range [\-1,\ 1].
109 返り値は [\-1,\ 1] の範囲となる。
113 .\"O is a NaN, a NaN is returned.
119 .\"O is +0 (\-0), +0 (\-0) is returned.
121 が +0 (\-0) の場合、+0 (\-0) が返される。
125 .\"O is positive infinity (negative infinity),
126 .\"O +1 (\-1) is returned.
128 が正の無限大 (負の無限大) の場合、+1 (\-1) が返される。
133 .\"O a range error occurs,
134 .\"O and the return value is 2*x/sqrt(pi).
136 が非正規化数の場合、範囲エラー (range error) が発生し、
137 返り値は 2*x/sqrt(pi) となる。
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 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
148 .\"O The following errors can occur:
151 .\"O Range error: result underflow (\fIx\fP is subnormal)
152 範囲エラー (range error): 結果がアンダーフローする (\fIx\fP が非正規化数)
156 .\"O An underflow floating-point exception
157 .\"O .RB ( FE_UNDERFLOW )
163 .\"O These functions do not set
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"
173 .\"O The variant returning
175 .\"O also conforms to
178 版の関数は SVr4, 4.3BSD にも準拠している。