Skip to main content
Log in

Mojo function

modf

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

Computes the integral and fractional part of the value.

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 value.

Returns:

A tuple containing the integral and fractional part of the value.

Was this page helpful?