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

    Function log1mexp

    • log(1 - exp(-x)) for x >= 0, accurate for both small and large x; note the sign of the argument. Not an R function. R has it only in its C API (Rmath.h), as log1mexp; the DPQ package also has it.

      Parameters

      • x: number

        A number >= 0.

      Returns number

      log(1 - exp(-x)); -Infinity at x = 0, 0 at x = Infinity, NaN for x < 0.

      log1mexp(1e-10); // -23.025850929990458