math.gamma() function

The math.gamma() function returns the Gamma function of x.

*Output data type: Float*

  1. import "math"
  2. math.gamma(x: 2.12)
  3. // Returns 1.056821007887572

Parameters

x

The value used in the operation.

*Data type: Float*

Special cases

  1. math.gamma(x: +Inf) = +Inf
  2. math.gamma(x: +0) = +Inf
  3. math.gamma(x: -0) = -Inf
  4. math.gamma(x: <0) = NaN for integer x < 0
  5. math.gamma(x: -Inf) = NaN
  6. math.gamma(x: NaN) = NaN