Skip to main content
Log in

Mojo function

sin

sin[type: DType, simd_width: Int, //](x: SIMD[type, simd_width]) -> SIMD[$0, $1]

Computes the sin of the inputs.

Constraints:

The input must be a floating-point type.

Parameters:

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

Args:

  • x (SIMD[type, simd_width]): The input argument.

Returns:

The sin of the input.

Was this page helpful?