Mojo function
sqrt
sqrt(x: Int) -> Int
Performs square root on an integer.
Args:
- βx (
Int
): The integer value to perform square root on.
Returns:
The square root of x.
sqrt[type: DType, simd_width: Int, //](x: SIMD[type, simd_width]) -> SIMD[$0, $1]
Performs elementwise square root on the elements of a SIMD vector.
Constraints:
The type must be an arithmetic or boolean type.
Parameters:
- βtype (
DType
): Thedtype
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]
): SIMD vector to perform square root on.
Returns:
The elementwise square root of x.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
If you'd like to share more information, please report an issue on GitHub
π What went wrong?