xref: /csrg-svn/lib/libm/common_source/erf.3 (revision 61285)
1*61285Sbostic.\" Copyright (c) 1985, 1991, 1993
2*61285Sbostic.\"	The Regents of the University of California.  All rights reserved.
324695Smckusick.\"
448401Sbostic.\" %sccs.include.redist.roff%
524695Smckusick.\"
6*61285Sbostic.\"     @(#)erf.3	8.1 (Berkeley) 06/04/93
748352Scael.\"
848352Scael.Dd
948352Scael.Dt ERF 3
1048352Scael.Os BSD 4.3
1148352Scael.Sh NAME
1248352Scael.Nm erf ,
1348352Scael.Nm erfc
1448352Scael.Nd error function operators
1548352Scael.Sh SYNOPSIS
1648352Scael.Fd #include <math.h>
1748352Scael.Ft double
1848352Scael.Fn erf "double x"
1948352Scael.Ft double
2048352Scael.Fn erfc "double x"
2148352Scael.Sh DESCRIPTION
2248352ScaelThese functions calculate the error function of
2348352Scael.Fa x .
2448352Scael.Pp
2548352ScaelThe
2648352Scael.Fn erf
2748352Scaelcalculates the error function of x; where
2848352Scael.Bd -filled -offset indent
2924370Smiriam.if n \{\
3024370Smiriamerf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. \}
3124370Smiriam.if t \{\
3224370Smiriamerf\|(x) :=
3324370Smiriam(2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \}
3448352Scael.Ed
3548352Scael.Pp
3648352ScaelThe
3748352Scael.Fn erfc
3848352Scaelfunction calculates the complementary error function of
3948352Scael.Fa x ;
4048352Scaelthat is
4148352Scael.Fn erfc
4248401Sbosticsubtracts the result of the error function
4348352Scael.Fn erf x
4448352Scaelfrom 1.0.
4548352ScaelThis is useful, since for large
4648401Sbostic.Fa x
4748401Sbosticplaces disappear.
4848352Scael.Sh SEE ALSO
4948352Scael.Xr math 3
5048352Scael.Sh HISTORY
5148352ScaelThe
5248352Scael.Fn erf
5348352Scaeland
5448352Scael.Fn erfc
5548401Sbosticfunctions appeared in
5648352Scael.Bx 4.3 .
57