View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default Difficulty with IMPOWER() Worksheet Function

3) The problem appears to be consistent with calculating theta [=atan(y/x)]

as "pi" instead of "0" for the above example "-8+0i"


As a side note, the value is Pi, and not 0 as in ...
=ATAN2(-8,0)

I believe your answer ( 1. + 1.73i ) is correct, as most math programs return the same principal root (as mentioned in Gary's article)
In Excel,that would be...

=IMEXP(IMPRODUCT(IMLN(-8),1/3))
=IMEXP(IMDIV(IMLN(-8),3))

I have a question...

=POWER(-8,1/3)

returns -2 in Excel 2007.

Is this a change? I thought this gave an error in prior versions ??? Does anyone remember?

Although correct in a sense, math program would return the principal root ..ie..

Power[-8., 1/3]
1.+ 1.73205 I

--
Dana DeLouis


"monir" wrote in message ...

Hello;

1) The cubic root of complex number "x+yi" is calculated using IMPOWER().
The w/s function appears to return incorrect values when the real
coefficient "x" is -ve.

2) For example:
A1:: -8+0i
B1::= IMPOWER(A1,1/3)
the function returns: 1. + 1.7320508i
instead of the correct value of -2.

3) The problem appears to be consistent with calculating theta [=atan(y/x)]
as "pi" instead of "0" for the above example "-8+0i"

How to fix the problem ?? According to Excel Help, the w/s function
IMPOWER() should work correctly regardless of the complex coefficients in A1
??

Thank you kindly.