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

    Function lbeta

    • Natural logarithm of the absolute value of the beta function, log|B(a, b)|. Equivalent to R's lbeta(). Takes single numbers.

      For a, b > 0 with the larger argument above 15, it is computed as lgamma(small) - [lgamma(large + small) - lgamma(large)] with the bracketed difference evaluated without cancellation, so accuracy is kept for large arguments.

      Parameters

      • a: number

        First argument.

      • b: number

        Second argument.

      Returns number

      log|B(a, b)|.

      lbeta(1000, 1000);  // -1388.4826016359023