For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
lgamma
def lgamma[dtype: DType, width: SIMDLength, //](x: SIMD[dtype, width]) -> SIMD[dtype, width] where dtype.is_floating_point()
Computes the lgamma of the inputs.
The error is about 2 ulp or less, including next to the negative real
zeros of lgamma (such as -2.457 and -2.748), where the result is near
0.
Constraints:
The input must be a floating-point type. float64 is not supported
on Apple GPU.
Parameters:
- dtype (
DType): Thedtypeof the input and output SIMD vector. - width (
SIMDLength): The width of the input and output SIMD vector.
Args:
- x (
SIMD[dtype, width]): The input argument.
Returns:
SIMD[dtype, width]: The lgamma of the input.