Login     Register

        Contact Us     Search

XLeratorDB/engineering Online Documentation

SQL Server IMPOWER function

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] (
   <@inumber, nvarchar(4000),>
 ,<@Number, float,>)
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. 
Return Types
·         Use COMPLEX to convert real and imaginary coefficients into a complex number

wct.IMPOWER('2+3i', 2)
This produces the following result

(1 row(s) affected)

Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service