Updated: 27 August 2010
Use IMPOWER to return a complex number in x + yi or x + yj text format raised to a power. A complex number raised to a power is calculated as follows:
r = IMABS(x+yi)
SELECT [wctEngineering].[wct].[IMPOWER] (
is a complex number you want to raise to a power. @inumber1 is an expression of type varchar or of a type that can be implicitly converted to varchar and must be in the format x + yi or x + yj, where x is a real number that can be converted to float and yi (or yj) is an imaginary number, where the y part can be converted to float.
is the power to which you want to raise the complex number. @Number is an expression of type float or of a type that can be implicitly converted to float.
· Use COMPLEX to convert real and imaginary coefficients into a complex number
select wct.IMPOWER('2+3i', 2)
This produces the following result
(1 row(s) affected)