Incorrect results and quirks
|
03-30-2015, 10:03 PM
Post: #1
|
|||
|
|||
Incorrect results and quirks
First off, I am not a calculator, nor math buff,... but I have been getting some very strange and inconsistent results out of my HP prime, and I would like to see if anyone can help me figure out why (or at least how to work around the issues).
Issue#1: When I graph the function: F1(X)=(X^2-4)^(2/3) It does not graph -2 < X < 2,... it returns "NaN" for that region. When I graph the same function using this form: F1(X)=(3 NTHROOT (X^2-4))^2 (either using the NTHROOT command, or using the NTHROOT symbol to get the cube root in textbook entry mode) it does graph the middle region,.... I'm not sure why it evaluates these two expressions differently, my TI-nSpire handles it correctly Issue #2: Incorrect result returned when passing a matrix containing a negative number to an expression. I will use the variable quirk to use in several forms of function (on the screen, and written as programs) and evaluate it for the value of "-1" and for 2 matrices, one with a -1 in the first position, the other with 1 in the first position. The expression is: (screenshot attached since I can't type it easily here) 2-2/(3 NROOT quirk) quirk:=-1 returns: 4 (correct) quirk:={-1, .5 , 2} returns: 1+1.73205080757*i, -0.51984209979, 0.412598948032 (first value is incorrect) quirk:={1, .5 , 2} returns: 0, -0.51984209979, 0.412598948032 (correct) To explore a little further, I wrote two programs, the first, testeval: EXPORT testeval(quirk) BEGIN RETURN (2-2/(3 NTHROOT quirk)); END; quirk:={-1, .5 , 2} testeval(quirk) returns: 4, -0.51984209979, 0.412598948032 (ALL CORRECT!!! WTF) and returns the same values as the previous expression for the other two values of quirk The second program I wrote, testeval2 EXPORT testeval2(quirk) BEGIN RETURN (2-2/quirk^(1/3)); END; returns the same value for the matrix with all positive numbers, but returns an error when quirk=-1 or a matrix with a negative number in it "Error:(X<0)^(∉Z)" So,.... I'm totally confused and feel like I can't rely on my HP Prime,... sigh,... I hope someone here has a little insight. |
|||
« 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: 1 Guest(s)