Skip to main content

Mojo function

nextafter

nextafter[dtype: DType, width: Int, //](arg0: SIMD[dtype, width], arg1: SIMD[dtype, width]) -> SIMD[dtype, width]

Computes next representable value of arg0 in the direction of arg1.

Constraints:

The element dtype of 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:

  • arg0 (SIMD[dtype, width]): The first input argument.
  • arg1 (SIMD[dtype, width]): The second input argument.

Returns:

The nextafter of the inputs.

Was this page helpful?