 |
NEURON
|
Go to the documentation of this file. 1 #include <../../nrnconf.h>
4 #if DOS || defined(__GO32__) || defined(WIN32)
15 static char RCSid[] =
"erf.cpp,v 1.5 1997/11/24 16:21:37 hines Exp";
47 #define a1 0.254829592
48 #define a2 -0.284496736
49 #define a3 1.421413741
50 #define a4 -1.453152027
51 #define a5 1.061405429
52 double erf(
double z) {
55 t = 1. / (1. + 0.3275911 *
fabs(z));
56 value = 1. - (((((a5 *
t + a4) *
t + a3) *
t + a2) *
t + a1) *
t) *
exp(-z * z);
64 double erfc(
double z) {