Incorrect results and quirks
|
03-31-2015, 04:24 AM
(This post was last modified: 03-31-2015 04:25 AM by Tim Wessman.)
Post: #6
|
|||
|
|||
RE: Incorrect results and quirks
Hello,
I would invite you to consider what wolfram alpha spits out here: http://www.wolframalpha.com/input/?i=X^%281%2F3%29 You'll notice that your X^1/3 does not return a nice, real number like you want. This is because the principal root - the one that makes the most sense mathematically - *is* complex for X < 0. You must click "change to real valued root" on that site to change it. This is equivalent to using ^ vs NTHROOT on the calculator. NTHROOT will give the real root while ^ returns the principle root. I would say that matching what is considered generally to be considered the best math software in the world (mathematica) would normally be considered a good thing! As for the (-) confusion, please remember that the negative operator is not the same as the minus operator in algebraic evaluation on calculators. Take a look at this output from the nspire. :-) On algebraic systems, the negative operator has a lower precedence then ^. So you are really evaluating -(1^1/3) not (-1)^1/3 as you might be thinking. Uh-oh! there is also that "non real root" error I mentioned in my first post. When you have a stored variable such as in your program, the value is used directly and so it is like surrounding your variable with a set of parenthesis. When you pass a list, it applies the arguments to each element of the list. If you hit an error, the error will be returned for the whole evaluation. TW Although I work for HP, the views and opinions I post here are my own. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Incorrect results and quirks - B1nary0 - 03-30-2015, 10:03 PM
RE: Incorrect results and quirks - Bill_G - 03-30-2015, 11:54 PM
RE: Incorrect results and quirks - Tim Wessman - 03-31-2015, 01:02 AM
RE: Incorrect results and quirks - B1nary0 - 03-31-2015, 02:23 AM
RE: Incorrect results and quirks - B1nary0 - 03-31-2015, 02:41 AM
RE: Incorrect results and quirks - Tim Wessman - 03-31-2015 04:24 AM
RE: Incorrect results and quirks - B1nary0 - 03-31-2015, 05:02 AM
RE: Incorrect results and quirks - Marcus von Cube - 03-31-2015, 08:48 PM
RE: Incorrect results and quirks - Arno K - 03-31-2015, 07:43 AM
RE: Incorrect results and quirks - B1nary0 - 04-01-2015, 12:27 AM
|
User(s) browsing this thread: 3 Guest(s)