1 //-----------------------------------------------------------------------------
3 // Author : philippe.billet@noos.fr
7 // GW Added erfc() from Numerical Recipes in C
9 //-----------------------------------------------------------------------------
13 static void yyerfc(void);
50 // from Numerical Recipes in C
58 t
= 1.0 / (1.0 + 0.5 * z
);
60 ans
=t
*exp(-z
*z
-1.26551223+t
*(1.00002368+t
*(0.37409196+t
*(0.09678418+
61 t
*(-0.18628806+t
*(0.27886807+t
*(-1.13520398+t
*(1.48851587+
62 t
*(-0.82215223+t
*0.17087277)))))))));
64 return x
>= 0.0 ? ans
: 2.0-ans
;
89 test(__FILE__
, s
, sizeof s
/ sizeof (char *));