Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Remember that Excel and almost all other computer programs do math
numerically in binary, not algebraically. Rational numbers of the form 1/n (where n is an integer) can only be exactly represented in Excel if n is an integer power of 2. Otherwise 1/n must be approximated. Similarly, rational numbers of the form m/n can only be exactly represented if n/g is an integer power of 2, where g is the greatest common divisor of both m and n. Otherwise m/n must be approximated. When Excel is asked to raise a negative number to a power that is close enough to 1/n for some integer n, then the power routine makes a guess that the number is an approximation to 1/n. This guess may be wrong, but the developers were willing to take that chance for numbers of the form 1/n, though not for general rational numbers m/n. It is a design decision. Presumably you do know whether the power is rational or not, where Excel can only guess. When it is rational, you can help Excel and insure that you get the answer you want by restructuring the calculation so that Excel is looking at ...^(1/n) not ...^(m/n). Note that even algebraic software may take the primary branch to be complex rather than real. For example, in Maple simplify((-3)^(-2/3)) is complex. Excel's Analysis ToolPak has functions for complex arithmetic http://groups.google.com/groups?selm...0no_e-mail.com Jerry Dailoc Nguyen wrote: Thanks for quick reply. We have some reply that are not quite getting along with each other. Mathematically, you can take an odd root of a negative number. Also those 2 statements are equivalent mathematically [(-3)^(-2/3) = ((-3)^(-2))^(1/3)] and should not yield an imaginary number. This question seems to be very interesting. Lmn. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel function to reverse the order of rows in a spreadsheet | Excel Worksheet Functions | |||
Looking for a macro/function in an excel spreadsheet (Help) | Excel Worksheet Functions | |||
Excel function button in spreadsheet | Excel Discussion (Misc queries) | |||
Excel function button in spreadsheet | Links and Linking in Excel | |||
What is the spreadsheet function in excel | Excel Worksheet Functions |