Mojo function
copysign
copysign[type: DType, simd_width: Int, //](magnitude: SIMD[type, simd_width], sign: SIMD[type, simd_width]) -> SIMD[$0, $1]
Returns a value with the magnitude of the first operand and the sign of the second operand.
Constraints:
The type of the input must be numeric.
Parameters:
- βtype (
DType
): Thedtype
of the input and output SIMD vector. - βsimd_width (
Int
): The width of the input and output SIMD vector.
Args:
- βmagnitude (
SIMD[type, simd_width]
): The magnitude to use. - βsign (
SIMD[type, simd_width]
): The sign to copy.
Returns:
Copies the sign from sign to magnitude.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
π What went wrong?