      function error_f(x) ! bernd berg may 31 1999.
c returns the error function erf(x). the long notation error_f is used
c to avoid conflicts with a possibly existing intrinsic function erf. 
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      error_f=sign(one,x)*gamma_p(half,x**2) ! incomplete gamma function.
      return
      end
