Chapter Contents

Previous

Next
erf

erf



Compute the Error Function

Portability: UNIX compatible


SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
RELATED FUNCTIONS
SEE ALSO


SYNOPSIS

#include <lcmath.h>

double erf(double x);


DESCRIPTION

erf computes the error function of its argument x . The value returned by erf is defined by this equation:

[IMAGE]


RETURN VALUE

erf returns the error function of its argument.


EXAMPLE

This example computes the error function using erf :

#include <stdio.h>
#include <lcmath.h>

#define SVECTOR .7854

main()
{
   double erfv;
   erfv = erf(SVECTOR);
   printf("erf(%f) = %f\n", SVECTOR, erfv);
}


RELATED FUNCTIONS

erfc , _matherr


SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.