1*48352Scael.\" Copyright (c) 1985, 1991 Regents of the University of California. 2*48352Scael.\" All rights reserved. 324695Smckusick.\" 4*48352Scael.\" %sccs.include.redist.man% 524695Smckusick.\" 6*48352Scael.\" @(#)erf.3 6.3 (Berkeley) 04/19/91 7*48352Scael.\" 8*48352Scael.Dd 9*48352Scael.Dt ERF 3 10*48352Scael.Os BSD 4.3 11*48352Scael.Sh NAME 12*48352Scael.Nm erf , 13*48352Scael.Nm erfc 14*48352Scael.Nd error function operators 15*48352Scael.Sh SYNOPSIS 16*48352Scael.Fd #include <math.h> 17*48352Scael.Ft double 18*48352Scael.Fn erf "double x" 19*48352Scael.Ft double 20*48352Scael.Fn erfc "double x" 21*48352Scael.Sh DESCRIPTION 22*48352ScaelThese functions calculate the error function of 23*48352Scael.Fa x . 24*48352Scael.Pp 25*48352ScaelThe 26*48352Scael.Fn erf 27*48352Scaelcalculates the error function of x; where 28*48352Scael.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. \} 34*48352Scael.Ed 35*48352Scael.Pp 36*48352ScaelThe 37*48352Scael.Fn erfc 38*48352Scaelfunction calculates the complementary error function of 39*48352Scael.Fa x ; 40*48352Scaelthat is 41*48352Scael.Fn erfc 42*48352Scaelsubtracts the result of 43*48352Scaelthe error function 44*48352Scael.Fn erf x 45*48352Scaelfrom 1.0. 46*48352ScaelThis is useful, since for large 47*48352Scael.Fa x , 48*48352Scaelsuch as x = 10, 12 places disappear. 49*48352Scael.Sh SEE ALSO 50*48352Scael.Xr math 3 51*48352Scael.Sh HISTORY 52*48352ScaelThe 53*48352Scael.Fn erf 54*48352Scaeland 55*48352Scael.Fn erfc 56*48352Scaelfunctions 57*48352Scaelappeared in 58*48352Scael.Bx 4.3 . 59