math.lgamma() function

The math.lgamma() function returns the natural logarithm and sign (-1 or +1) of math.gamma(x:x).

*Output data format: Record*

  1. import "math"
  2. math.lgamma(x: 3.14)
  3. // Returns {lgamma: 0.8261387047770286, sign: 1}

Parameters

x

The value used in the operation.

*Data type: Float*

Special cases

  1. math.lgamma(x: +Inf) // Returns +Inf
  2. math.lgamma(x: 0) // Returns +Inf
  3. math.lgamma(x: -integer) // Returns +Inf
  4. math.lgamma(x: -Inf) // Returns -Inf
  5. math.lgamma(x: NaN) // Returns NaN