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"
47 erf, erff, erfl \- 誤差関数
52 .BI "double erf(double " x );
53 .BI "float erff(float " x );
54 .BI "long double erfl(long double " x );
61 .RB ( feature_test_macros (7)
68 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE ||
69 _POSIX_C_SOURCE\ >=\ 200112L;
78 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
79 _POSIX_C_SOURCE\ >=\ 200112L;
87 は \fIx\fP の誤差関数を返す関数で、以下のように定義されている。
89 erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(\-t*t) dt
94 返り値は [\-1,\ 1] の範囲となる。
100 が +0 (\-0) の場合、+0 (\-0) が返される。
103 が正の無限大 (負の無限大) の場合、+1 (\-1) が返される。
106 が非正規化数の場合、範囲エラー (range error) が発生し、
107 返り値は 2*x/sqrt(pi) となる。
109 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
115 範囲エラー (range error): 結果がアンダーフローする (\fIx\fP が非正規化数)
126 .\" FIXME . Is it intentional that these functions do not set errno?
127 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785
131 版の関数は SVr4, 4.3BSD にも準拠している。