1 '\" te
   2 .\" Copyright (c) 2001, the Institute of Electrical
   3 .\" and Electronics Engineers, Inc. and The Open Group. All Rights Reserved.
   4 .\" Copyright (c) 1992, X/Open Company Limited.
   5 .\" All Rights Reserved.
   6 .\" Copyright (c) 1983 Regents of the University
   7 .\" of California. All rights reserved. The Berkeley software License Agreement
   8 .\" specifies the terms and conditions for redistribution.
   9 .\" Portions Copyright (c) 2006, Sun Microsystems,
  10 .\" Inc.  All Rights Reserved.
  11 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at 
  12 .\" http://www.opengroup.org/bookstore/.
  13 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
  14 .\"  This notice shall appear on any product containing this material.
  15 .TH erf 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions"
  16 .SH NAME
  17 erf, erff, erfl \- error function
  18 .SH SYNOPSIS
  19 .LP
  20 .nf
  21 c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ]
  22 #include <math.h>
  23 
  24 \fBdouble\fR \fBerf\fR(\fBdouble\fR \fIx\fR);
  25 .fi
  26 
  27 .LP
  28 .nf
  29 \fBfloat\fR \fBerff\fR(\fBfloat\fR \fIx\fR);
  30 .fi
  31 
  32 .LP
  33 .nf
  34 \fBlong double\fR \fBerfl\fR(\fBlong double\fR \fIx\fR);
  35 .fi
  36 
  37 .SH DESCRIPTION
  38 .sp
  39 .LP
  40 These functions compute the error function of their argument \fIx\fR, defined
  41 as:
  42 .sp
  43 2/sqrt(pi)*intregral from 0 to x of exp(-t*t) dt
  44 .SH RETURN VALUES
  45 .sp
  46 .LP
  47 Upon successful completion, these functions return the value of the error
  48 function.
  49 .sp
  50 .LP
  51 If \fIx\fR is NaN, a NaN is returned.
  52 .sp
  53 .LP
  54 If \fIx\fR is \(+-0, \(+-0 is returned.
  55 .sp
  56 .LP
  57 If \fIx\fR is \(+-Inf, \(+-1 is returned.
  58 .sp
  59 .LP
  60 If \fIx\fR is subnormal, 2/sqrt(\c
  61 .if n pi\c
  62 .if t \(*p
  63 \c
  64 ) * 2 is returned.
  65 .SH ATTRIBUTES
  66 .sp
  67 .LP
  68 See \fBattributes\fR(5) for descriptions of the following attributes:
  69 .sp
  70 
  71 .sp
  72 .TS
  73 tab() box;
  74 cw(2.75i) |cw(2.75i) 
  75 lw(2.75i) |lw(2.75i) 
  76 .
  77 ATTRIBUTE TYPEATTRIBUTE VALUE
  78 _
  79 Interface StabilityStandard
  80 _
  81 MT-LevelMT-Safe
  82 .TE
  83 
  84 .SH SEE ALSO
  85 .sp
  86 .LP
  87 \fBerfc\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M),
  88 \fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5)