OSDN Git Service

7f74d6ade04a5461672d80bc92eee9b4b5a755a5
[linuxjm/LDP_man-pages.git] / release / 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 .SH 名前
47 erf, erff, erfl \- 誤差関数
48 .SH 書式
49 .nf
50 .B #include <math.h>
51
52 .BI "double erf(double " x );
53 .BI "float erff(float " x );
54 .BI "long double erfl(long double " x );
55
56 .fi
57 \fI\-lm\fP でリンクする。
58 .sp
59 .in -4n
60 glibc 向けの機能検査マクロの要件
61 .RB ( feature_test_macros (7)
62 参照):
63 .in
64 .sp
65 .ad l
66 .BR erf ():
67 .RS 4
68 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE ||
69 _POSIX_C_SOURCE\ >=\ 200112L;
70 .br
71 or
72 .I cc\ -std=c99
73 .RE
74 .br
75 .BR erff (),
76 .BR erfl ():
77 .RS 4
78 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
79 _POSIX_C_SOURCE\ >=\ 200112L;
80 .br
81 or
82 .I cc\ -std=c99
83 .RE
84 .ad b
85 .SH 説明
86 .BR erf ()
87 は \fIx\fP の誤差関数を返す関数で、以下のように定義されている。
88 .TP
89     erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(\-t*t) dt
90 .SH 返り値
91 成功すると、これらの関数は
92 .I x
93 の誤差関数を返す。
94 返り値は [\-1,\ 1] の範囲となる。
95
96 .I x
97 が NaN の場合、NaN が返される。
98
99 .I x
100 が +0 (\-0) の場合、+0 (\-0) が返される。
101
102 .I x
103 が正の無限大 (負の無限大) の場合、+1 (\-1) が返される。
104
105 .I x
106 が非正規化数の場合、範囲エラー (range error) が発生し、
107 返り値は 2*x/sqrt(pi) となる。
108 .SH エラー
109 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
110 .BR math_error (7)
111 を参照のこと。
112 .PP
113 以下のエラーが発生する可能性がある。
114 .TP
115 範囲エラー (range error): 結果がアンダーフローする (\fIx\fP が非正規化数)
116 .\" .I errno
117 .\" is set to
118 .\" .BR ERANGE .
119 アンダーフロー浮動小数点例外
120 .RB ( FE_UNDERFLOW )
121 が上がる。
122 .PP
123 これらの関数は
124 .I errno
125 を設定しない。
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
128 .SH 準拠
129 C99, POSIX.1-2001.
130 .I double
131 版の関数は SVr4, 4.3BSD にも準拠している。
132 .SH 関連項目
133 .BR cerf (3),
134 .BR erfc (3),
135 .BR exp (3)