Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/base/special/gammainc/docs/types/index.d"

Index

Functions

Functions

Export assignment gammainc

  • gammainc(x: number, a: number, regularized?: undefined | false | true, upper?: undefined | false | true): number
  • Computes the regularized incomplete gamma function.

    Notes

    • The regularized and upper parameters specify whether to evaluate the non-regularized and/or upper incomplete gamma functions, respectively.
    • If provided x < 0 or s <= 0, the function returns NaN.

    Parameters

    • x: number

      function parameter

    • a: number

      function parameter

    • Optional regularized: undefined | false | true

      boolean indicating if the function should evaluate the regularized or non-regularized incomplete gamma functions (default: true)

    • Optional upper: undefined | false | true

      boolean indicating if the function should return the upper tail of the incomplete gamma function (default: false)

    Returns number

    function value

    Example

    javascript var y = gammainc( 6.0, 2.0 ) // returns ~0.9826

    Example

    javascript var y = gammainc( 1.0, 2.0, true, true ) // returns ~0.7358

    Example

    javascript var y = gammainc( 7.0, 5.0 ) // returns ~0.8270

    Example

    javascript var y = gammainc( 7.0, 5.0, false ) // returns ~19.8482

    Example

    javascript var y = gammainc( NaN, 2.0 ) // returns NaN

    Example

    var y = gammainc( 6.0, NaN )
    // returns NaN