LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Difficulty with IMPOWER() Worksheet Function

monir wrote...
Thank you all for your thoughtful replies. Here're some comments:

1) One would expect the w/s function IMPOWER("x+yi",1/3) to return the
principal value, if any, similar to:
....=IMSQRT("-4+0i") correctly returning +2i and not -2i
....=IMPOWER("8+0i",1/3) correctly returning +2.0, and not -1+sqrt(3)i or
-1-sqrt(3)i


From the World of Mathematics: 'Informally, the term "principal root"
is often used to refer to the root of unity having smallest positive
complex argument.' In this sense, Excel's IMPOWER *does* return the
principal root.

2) Hence, IMPOWER("-8+0i",1/3) should return -2.0 and not one of the
conjugate pair 1+sqrt(3)i or 1-sqrt(3)i.


'Hence' based on a faulty (in this case, faulty semantics) conditions
leads to vacuous conclusions. Notationally, A = B, if A is false the
statement is true no matter whether B is true or false.

3) My experience with complex numbers in XL environment is rather limited.
However, one might reasonably argue that a complex number with zero imaginary
coefficient is equivalent to a real number!


Yup. So?

Now try =POWER(-8,1/3). You would correctly get -2.0 and not #NUM!


Again, so? *All* reals have real odd order roots. If you want real
roots for real numbers, use POWER, not IMPOWER.

4) IMPOWER() actually relies on ATAN2(x,y) and not ATAN(y/x) to convert
complex numbers to polar, contrary to the XL Help info on the function.

....

So? ATAN2 and equivalents in other programming languages are
**ALWAYS** preferable to ATAN. Anyway, online help for IMPOWER doesn't
show ATAN, it shows a symbolic inverse tangent. Not unambiguous, but
not necessarily an error.

This together with the always non-negative "r" maybe an internally-wired
factor determining which value is returned by IMPOWER() and similar complex
number functions.


If you're talking about polar coordinates, r is necessarily always
nonnegative BY DEFINITION. Norms always give nonnegative real results.
And the principle nth root is always based on the principal argument
in the interval [0, 2 pi) and dividing it by n. That ALWAYS returns
the root in the 1st quadrant of the complex plane with the smallest
positive argument, so the principal root as informally defined above.

In this case Microsoft is following generally accepted mathematical
conventions. Adapt!


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulty in transposing Richard J New Users to Excel 12 August 6th 06 09:53 AM
VLOOKUP Difficulty Serge Excel Discussion (Misc queries) 5 June 21st 06 02:50 AM
difficulty with Search function that incorporates multiple workshe gloss Excel Discussion (Misc queries) 1 May 9th 06 06:46 AM
Price Function - Difficulty in understanding the formula abhi_23 Excel Worksheet Functions 0 January 18th 06 09:41 AM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 09:46 PM


All times are GMT +1. The time now is 05:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"