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

    Function lfactorial

    • Logarithm of the factorial. Equivalent to R's lfactorial(). Takes a single number: lgamma(x + 1), computed without forming x + 1 near 0 so that small x keep their accuracy.

      Parameters

      • x: number

        Argument.

      Returns number

      log|x!| = log|Gamma(x + 1)| (Infinity at negative integers).

      lfactorial(100);  // 363.73937555556347