rStats.js v1.3.0
    Preparing search index...

    Function erfc

    • Complementary error function, erfc(x) = 1 - erf(x), accurate in the upper tail (down to the subnormal range near x = 27). Not an R function. R writes it as 2 * pnorm(x * sqrt(2), lower.tail = FALSE).

      Parameters

      • a: number

        Argument.

      Returns number

      erfc(a).

      erfc(5);  // 1.537459794428035e-12
      

      Changes from xsf: exp(-x^2) is formed from x^2 = hi + lo exact (the rounding of x^2 is 33 ε relative at x = 5.7), and below the normal range exp(-700) is applied last so that subnormal results (x up to 27.2) are not flushed to 0.