code: public static double erfcc(double x) {
          double z = Math.abs(x);
          double t = 2.0 / (2.0 + z);
          double ans = t * Math.exp(-z * z - 1.26551223 + t * (1.00002368 + t * (0.37409196 + t * (0.09678418 +
                  t * (-0.18628806 + t * (0.27886807 + t * (-1.13520398 + t * (1.48851587 +
                  t * (-0.82215223 + t * 0.17087277)))))))));
  
          return (x >= 0.0 ? ans : 2.0 - ans);
      }
docs: The complementary error function with fractional error everywhere less
  than 1.2 &times; 10<sup>-7</sup>. This concise routine is faster than erfc.