LISTING 13: Performing Aggregate Computations with Complex Functions
DECLARE @sumproduct AS complex
SET @sumproduct = '0 + 0i'
SELECT
@sumproduct = dbo.cxAdd(@sumproduct, dbo.cxMult(cx1, cx2))
FROM
ComplexNumbers
PRINT 'The sum product of the vectors is: ' + @sumproduct
The sum product of the vectors is: 8 + 252i.