Skip to main content

Mojo function

gamma

gamma[dtype: DType, width: Int, //](x: SIMD[dtype, width]) -> SIMD[dtype, width]

Computes the Gamma of the input.

For details, see https://en.wikipedia.org/wiki/Gamma_function.

Constraints:

The input must be a floating-point type.

Parameters:

  • dtype (DType): The dtype of the input and output SIMD vector.
  • width (Int): The width of the input and output SIMD vector.

Args:

  • x (SIMD[dtype, width]): The input argument.

Returns:

The Gamma function evaluated at the input.

Was this page helpful?