_mm_csqrt_ps
Classification
SVML, Elementary Math Functions, CPUID Test: SSE
Header File
Synopsis
_mm_csqrt_ps(__m128 a);
Description
Compute the square root of packed complex snumbers in "a", and store the complex results in "dst". Each complex number is composed of two adjacent single-precision (32-bit) floating-point elements, which defines the complex number "complex = vec.fp32[0] + i * vec.fp32[1]".
Operation
DEFINE CSQRT(a[31:0], b[31:0]) {
sign[31:0] := (b < 0.0) ? -FP32(1.0) : FP32(1.0)
result[31:0] := SQRT((a + SQRT(POW(a, 2.0) + POW(b, 2.0))) / 2.0)
result[63:32] := sign * SQRT((-a + SQRT(POW(a, 2.0) + POW(b, 2.0))) / 2.0)
RETURN result
}
FOR j := 0 to 1
i := j*64
dst[i+63:i] := CSQRT(a[i+31:i], a[i+63:i+32])
ENDFOR
dst[MAX:128] := 0