From Prof. Kahan at UC at Berkeley .\" Copyright (c) 1985 Regents of the University of California. .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" .\" @(#)erf.3 6.2 (Berkeley) %G% .\" .TH ERF 3M "" .UC 6 .SH NAME erf, erfc \- error functions .SH SYNOPSIS .nf .B #include .PP .B double erf(x) .B double x; .PP .B double erfc(x) .B double x; .fi .SH DESCRIPTION Erf\|(x) returns the error function of x; where .if n \{\ .PP erf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. \} .if t \{\ erf\|(x) := (2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \} .PP Erfc\|(x) returns 1.0\-erf\|(x). .PP The entry for erfc is provided because of the extreme loss of relative accuracy if erf\|(x) is called for large x and the result subtracted from 1. (e.g. for x = 10, 12 places are lost). .SH SEE ALSO math(3M)