1*05a0b428SJohn Marino.\" $OpenBSD: erf.3,v 1.14 2013/06/05 03:40:26 tedu Exp $ 2*05a0b428SJohn Marino.\" Copyright (c) 1985, 1991 Regents of the University of California. 3*05a0b428SJohn Marino.\" All rights reserved. 4*05a0b428SJohn Marino.\" 5*05a0b428SJohn Marino.\" Redistribution and use in source and binary forms, with or without 6*05a0b428SJohn Marino.\" modification, are permitted provided that the following conditions 7*05a0b428SJohn Marino.\" are met: 8*05a0b428SJohn Marino.\" 1. Redistributions of source code must retain the above copyright 9*05a0b428SJohn Marino.\" notice, this list of conditions and the following disclaimer. 10*05a0b428SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright 11*05a0b428SJohn Marino.\" notice, this list of conditions and the following disclaimer in the 12*05a0b428SJohn Marino.\" documentation and/or other materials provided with the distribution. 13*05a0b428SJohn Marino.\" 3. Neither the name of the University nor the names of its contributors 14*05a0b428SJohn Marino.\" may be used to endorse or promote products derived from this software 15*05a0b428SJohn Marino.\" without specific prior written permission. 16*05a0b428SJohn Marino.\" 17*05a0b428SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18*05a0b428SJohn Marino.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19*05a0b428SJohn Marino.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20*05a0b428SJohn Marino.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21*05a0b428SJohn Marino.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22*05a0b428SJohn Marino.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23*05a0b428SJohn Marino.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24*05a0b428SJohn Marino.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25*05a0b428SJohn Marino.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26*05a0b428SJohn Marino.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27*05a0b428SJohn Marino.\" SUCH DAMAGE. 28*05a0b428SJohn Marino.\" 29*05a0b428SJohn Marino.\" from: @(#)erf.3 6.4 (Berkeley) 4/20/91 30*05a0b428SJohn Marino.\" 31*05a0b428SJohn Marino.Dd $Mdocdate: June 5 2013 $ 32*05a0b428SJohn Marino.Dt ERFC 3 33*05a0b428SJohn Marino.Os 34*05a0b428SJohn Marino.Sh NAME 35*05a0b428SJohn Marino.Nm erf , 36*05a0b428SJohn Marino.Nm erff , 37*05a0b428SJohn Marino.Nm erfl , 38*05a0b428SJohn Marino.Nm erfc , 39*05a0b428SJohn Marino.Nm erfcf , 40*05a0b428SJohn Marino.Nm erfcl 41*05a0b428SJohn Marino.Nd error function operators 42*05a0b428SJohn Marino.Sh SYNOPSIS 43*05a0b428SJohn Marino.In math.h 44*05a0b428SJohn Marino.Ft double 45*05a0b428SJohn Marino.Fn erf "double x" 46*05a0b428SJohn Marino.Ft float 47*05a0b428SJohn Marino.Fn erff "float x" 48*05a0b428SJohn Marino.Ft long double 49*05a0b428SJohn Marino.Fn erfl "long double x" 50*05a0b428SJohn Marino.Ft double 51*05a0b428SJohn Marino.Fn erfc "double x" 52*05a0b428SJohn Marino.Ft float 53*05a0b428SJohn Marino.Fn erfcf "float x" 54*05a0b428SJohn Marino.Ft long double 55*05a0b428SJohn Marino.Fn erfcl "long double x" 56*05a0b428SJohn Marino.Sh DESCRIPTION 57*05a0b428SJohn MarinoThese functions calculate the error function of 58*05a0b428SJohn Marino.Fa x . 59*05a0b428SJohn Marino.Pp 60*05a0b428SJohn MarinoThe 61*05a0b428SJohn Marino.Fn erf 62*05a0b428SJohn Marinocalculates the error function of x, and 63*05a0b428SJohn Marinothe 64*05a0b428SJohn Marino.Fn erff 65*05a0b428SJohn Marinoand 66*05a0b428SJohn Marino.Fn erfl 67*05a0b428SJohn Marinofunctions are single and double precision versions of 68*05a0b428SJohn Marino.Fn erf . 69*05a0b428SJohn MarinoThe error function is defined as: 70*05a0b428SJohn Marino.Bd -filled -offset indent 71*05a0b428SJohn Marino.if n \{\ 72*05a0b428SJohn Marinoerf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. \} 73*05a0b428SJohn Marino.if t \{\ 74*05a0b428SJohn Marinoerf\|(x) := 75*05a0b428SJohn Marino(2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \} 76*05a0b428SJohn Marino.Ed 77*05a0b428SJohn Marino.Pp 78*05a0b428SJohn MarinoThe 79*05a0b428SJohn Marino.Fn erfc 80*05a0b428SJohn Marinofunction calculates the complementary error function of 81*05a0b428SJohn Marino.Fa x ; 82*05a0b428SJohn Marinothat is 83*05a0b428SJohn Marino.Fn erfc 84*05a0b428SJohn Marinosubtracts the result of the error function 85*05a0b428SJohn Marino.Fn erf x 86*05a0b428SJohn Marinofrom 1.0. 87*05a0b428SJohn MarinoThis is useful, since for large 88*05a0b428SJohn Marino.Fa x 89*05a0b428SJohn Marinoplaces disappear. 90*05a0b428SJohn MarinoThe 91*05a0b428SJohn Marino.Fn erfcf 92*05a0b428SJohn Marinoand 93*05a0b428SJohn Marino.Fn erfcl 94*05a0b428SJohn Marinofunctions are single and double precision version of 95*05a0b428SJohn Marino.Fn erfc . 96*05a0b428SJohn Marino.Sh SEE ALSO 97*05a0b428SJohn Marino.Xr exp 3 98*05a0b428SJohn Marino.Sh HISTORY 99*05a0b428SJohn MarinoThe 100*05a0b428SJohn Marino.Fn erf 101*05a0b428SJohn Marinoand 102*05a0b428SJohn Marino.Fn erfc 103*05a0b428SJohn Marinofunctions appeared in 104*05a0b428SJohn Marino.Bx 4.3 . 105