4.3BSD version dated 09/12/85.
[unix-history] / usr / src / lib / libm / common_source / erf.3
CommitLineData
f984ed4a 1From Prof. Kahan at UC at Berkeley
f9628029
KM
2.\" Copyright (c) 1985 Regents of the University of California.
3.\" All rights reserved. The Berkeley software License Agreement
4.\" specifies the terms and conditions for redistribution.
5.\"
6.\" @(#)erf.3 6.1 (Berkeley) %G%
7.\"
8.TH ERF 3M ""
9.UC 6
f984ed4a
MAN
10.SH NAME
11erf, erfc \- error functions
12.SH SYNOPSIS
13.nf
14.B #include <math.h>
15.PP
16.B double erf(x)
17.B double x;
18.PP
19.B double erfc(x)
20.B double x;
21.fi
22.SH DESCRIPTION
e4b02bf2
MAN
23Erf\|(x) returns the error function of x; where
24.if n \{\
f984ed4a 25.PP
e4b02bf2
MAN
26erf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. \}
27.if t \{\
28erf\|(x) :=
29(2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \}
f984ed4a 30.PP
e4b02bf2 31Erfc\|(x) returns 1.0\-erf\|(x).
f984ed4a 32.PP
e4b02bf2
MAN
33The entry for erfc is provided because of the extreme loss
34of relative accuracy if erf\|(x) is called for large x
f984ed4a 35and the result subtracted from 1.
e4b02bf2 36(e.g. for x = 10, 12 places are lost).
f984ed4a
MAN
37.SH SEE ALSO
38intro(3M)