@Reference(authors = "T. Ooura", //
      title = "Gamma / Error Functions", booktitle = "", //
      url = "http://www.kurims.kyoto-u.ac.jp/~ooura/gamerf.html", //
      bibkey = "web/Ooura96")
  public static double erfc(double x) {
    if(Double.isNaN(x)) {
      return Double.NaN;
    }
    if(Double.isInfinite(x)) {
      return (x < 0.0) ? 2 : 0;
    }
    final double t = 3.97886080735226 / (Math.abs(x) + 3.97886080735226);
    final double u = t - 0.5;
    double y = (((//
    ((((((0.00127109764952614092 * u //
        + 1.19314022838340944e-4) * u //
        - 0.003963850973605135) * u //
        - 8.70779635317295828e-4) * u //
        + 0.00773672528313526668) * u //
        + 0.00383335126264887303) * u //
        - 0.0127223813782122755) * u //
        - 0.0133823644533460069) * u //
        + 0.0161315329733252248) * u //
        + 0.0390976845588484035) * u //
        + 0.00249367200053503304;
    y = ((((((((((((y * u //
        - 0.0838864557023001992) * u //
        - 0.119463959964325415) * u //
        + 0.0166207924969367356) * u //
        + 0.357524274449531043) * u //
        + 0.805276408752910567) * u //
        + 1.18902982909273333) * u //
        + 1.37040217682338167) * u //
        + 1.31314653831023098) * u //
        + 1.07925515155856677) * u //
        + 0.774368199119538609) * u //
        + 0.490165080585318424) * u //
        + 0.275374741597376782) //
        * t * FastMath.exp(-x * x);
    return x < 0 ? 2 - y : y;
  }
@ Reference ( authors = "T. Ooura" , title = "Gamma / Error Functions" , booktitle = "" , url = "http://www.kurims.kyoto-u.ac.jp/~ooura/gamerf.html" , bibkey = "web/Ooura96" ) public static double erfc ( double x ) { if ( Double . isNaN ( x ) ) { return Double . NaN ; } if ( Double . isInfinite ( x ) ) { return ( x < 0.0 ) ? 2 : 0 ; } final double t = 3.97886080735226 / ( Math . abs ( x ) + 3.97886080735226 ) ; final double u = t - 0.5 ; double y = ( ( ( ( ( ( ( ( ( 0.00127109764952614092 * u + 1.19314022838340944e-4 ) * u - 0.003963850973605135 ) * u - 8.70779635317295828e-4 ) * u + 0.00773672528313526668 ) * u + 0.00383335126264887303 ) * u - 0.0127223813782122755 ) * u - 0.0133823644533460069 ) * u + 0.0161315329733252248 ) * u + 0.0390976845588484035 ) * u + 0.00249367200053503304 ; y = ( ( ( ( ( ( ( ( ( ( ( ( y * u - 0.0838864557023001992 ) * u - 0.119463959964325415 ) * u + 0.0166207924969367356 ) * u + 0.357524274449531043 ) * u + 0.805276408752910567 ) * u + 1.18902982909273333 ) * u + 1.37040217682338167 ) * u + 1.31314653831023098 ) * u + 1.07925515155856677 ) * u + 0.774368199119538609 ) * u + 0.490165080585318424 ) * u + 0.275374741597376782 ) * t * FastMath . exp ( - x * x ) ; return x < 0 ? 2 - y : y ; }
Complementary error function for Gaussian distributions = Normal
distributions.
<p>
Based on:<br>
Takuya Ooura, http://www.kurims.kyoto-u.ac.jp/~ooura/gamerf.html<br>
Copyright (C) 1996 Takuya OOURA (email: ooura@mmm.t.u-tokyo.ac.jp).<br>
"You may use, copy, modify this code for any purpose and without fee."

@param x parameter value
@return erfc(x)