Mojo function
ulp
ulp[dtype: DType, simd_width: Int](x: SIMD[dtype, simd_width]) -> SIMD[dtype, simd_width]
Computes the ULP (units of last place) or (units of least precision) of the number.
Constraints:
The element dtype of the inpiut must be a floating-point type.
Parameters:
- dtype (
DType
): Thedtype
of the input and output SIMD vector. - simd_width (
Int
): The width of the input and output SIMD vector.
Args:
- x (
SIMD[dtype, simd_width]
): SIMD vector input.
Returns:
The ULP of x.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!