question: public double erf ( double z ) { double sign = Math . signum ( z ) ; z = Math . abs ( z ) ; double a1 = 0.278393 , a2 = 0.230389 , a3 = 0.000972 , a4 = 0.078108 ; double sumterm = 1 + a1 * z + a2 * Math . pow ( z , 2 ) + a3 * Math . pow ( z , 3 ) + a4 * Math . pow ( z , 4 ) ; return sign * ( 1 - 1 / ( Math . pow ( sumterm , 4 ) ) ) ; }
target:  approximation of error function, equation 7.1.27 from Abramowitz, M. and Stegun, I. A. (Eds.). "Repeated Integrals of the Error Function." S 7.2  in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables,  9th printing. New York: Dover, pp. 299-300, 1972. error of approximation <= 5*10^-4