Documentation/Calc Functions/IMPOWER

    From The Document Foundation Wiki
    Other languages:


    Function name:

    IMPOWER

    Category:

    Add-in

    Summary:

    Calculates the complex number that results from raising a complex number to a real power.

    Syntax:

    IMPOWER(ComplexNumber; Number)

    Returns:

    Returns a text string giving the complex number that is obtained by raising the complex number passed as argument to the given power.

    Arguments:

    ComplexNumber is a string (in quotation marks) representing a complex number in the form a+bi or a+bj, or a reference to a cell containing that string, which is the complex number for which the power is to be calculated. a and b are real numbers.

    Number is a real number, or a reference to a cell containing that number, that specifies the power to which ComplexNumber is to be raised.

    • If ComplexNumber does not have an imaginary part (b equal to 0), the real part can be passed to IMPOWER as a number rather than a string.
    • If both real and imaginary parts of ComplexNumber are 0, and Number <= 0, then IMPOWER reports an invalid argument error (Err:502).
    • If ComplexNumber is not a valid complex number, IMPOWER reports an invalid argument error (Err:502).
    • If Number is non-numeric, then IMPOWER reports a #VALUE! error.

    Additional details:

    Details specific to IMPOWER function

    A complex number z expressed in its rectangular form z=a+bi can be re-written in polar form as z=r(cosφ+isinφ), where r is the absolute value of the complex number and φ is its argument.

    After converting ComplexNumber to polar form, IMPOWER solves the following equation:

    Equation for IMPOWER function

    where p is the required power given by the supplied value of the Number parameter.

    Calc does not support the alternative syntax of IMPOWER( Complex X ; Complex Y ) that is suggested in ODF 1.2.


    General information about Calc's handling of complex numbers

    Note pin.svg

    Note:
    For convenience, the information in this subsection is repeated on all pages describing functions that manipulate complex numbers.

    • A complex number is a number that can be expressed in the form a+bi, where a and b are real numbers and i is a symbol for the imaginary unit, such that i2=−1. a is known as the real part of the complex number and b is known as its imaginary part.
    • In some disciplines using i to indicate the imaginary unit may be undesirable and, in such cases, the symbol j may be used instead. The functions provided by Calc to process complex numbers can use either i or j.
    • For additional general background information, visit Wikipedia’s Complex number page.
    • Within Calc, a complex number is represented as a string expression of the form "a+bi" or "a+bj", where a and b are real numbers. If the complex number happens to be a real number (b=0), then it can be represented as either a string expression or a numeric value. Complex number string expressions should not contain any space characters. Examples of valid Calc complex numbers include "2", -6, "2+3i", "3j", "12.34+56.78i", and "1e+23-1e-22j". Calc would not recognize the strings "1+j2", "i+1", and "i+j" as valid complex numbers.
    • The representation of the complex numbers in strings can have up to 15 significant digits and scientific style is automatically used if needed (visit Wikipedia’s Scientific notation page for more information). The decimal delimiter in complex number string expressions is always a dot, irrespective of locale setting.

    Examples:

    Formula Description Returns
    =IMPOWER("2+3i"; 2) Here the function calculates the integer power of a complex number that has non-zero real and imaginary parts. -5+12i
    =IMPOWER("2+3j"; -2.4) Here the function calculates the real power of a complex number that has non-zero real and imaginary parts. -0.0326467925500975-0.0324832866856815j
    =IMPOWER(2; 3) Here the function calculates the integer power of a real number. 8
    =IMPOWER(F1; F2) where cell F1 contains the complex number 2-3j and cell F2 contains the value 3. Here the function calculates the integer power of a complex number, with both arguments entered in cells. -46-9.00000000000001j

    Related LibreOffice functions:

    IMEXP

    IMLN

    IMLOG10

    IMLOG2

    IMSQRT

    ODF standard:

    Section 6.8.17, part 2

    Related (or similar) Excel functions:

    IMPOWER