Skip to contents

Element-wise natural logarithm of the absolute value of the gamma function.

Usage

prim_lgamma(operand)

Arguments

operand

(arrayish)
Arrayish value of data type floating-point.

Value

arrayish
Has the same shape and data type as the input. It is ambiguous if the input is ambiguous.

Implemented Rules

  • stablehlo

  • reverse

StableHLO

Lowers to stablehlo::hlo_lgamma().

See also

Examples

x <- nv_array(c(0.5, 1, 2, 5))
prim_lgamma(x)
#> AnvlArray
#>  5.7236e-01
#>  4.7684e-07
#>  0.0000e+00
#>  3.1781e+00
#> [ CPUf32{4} ]