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