Post Reply 
The most powerful calculator in the world
12-12-2017, 12:13 PM
Post: #1
The most powerful calculator in the world
Well, just for curiosity, I googled the title of the thread to see what it shows, and I found a forum saying that TI Nspire CAS was the best. The reason: he tried to do this: solve(a*x^3+b*x^2+c*x+d=0, x) and the calc managed to solve it with a huge expression.

The result is not very profitable, but it served to test a calculator with a very difficult test, and it was successful.
Obviously, as a proud owner of the HP Prime, I wanted to try, but did not give the solution. Unless there is another procedure that achieves it. Can you get it with yours?
I imagine that there are a thousand ways to justify which is the best calculator in the world, and surely the HP Prime is the best in many aspects, but I wanted to leave this thread in case anyone accepts the challenge of getting HP to be able to solve that equation with symbolic variables.

Anyway, do you think HP Prime is the best calculator in the world? (take in consideration that v3 beta firmware has been released). If not, which one?
Find all posts by this user
Quote this message in a reply
12-12-2017, 01:02 PM
Post: #2
RE: The most powerful calculator in the world
(12-12-2017 12:13 PM)akmon Wrote:  Well, just for curiosity, I googled the title of the thread to see what it shows, and I found a forum saying that TI Nspire CAS was the best. The reason: he tried to do this: solve(a*x^3+b*x^2+c*x+d=0, x) and the calc managed to solve it with a huge expression.

Anyway, do you think HP Prime is the best calculator in the world? (take in consideration that v3 beta firmware has been released). If not, which one?

The word "best" is so subjective as to be useless in most cases. What's best for most people here is useless to me. Since I spend all my time programming and none at all solving problems like the one above, the Prime is far and away the most powerful (and, dare I say it, best!) handheld calculator for me. HPPL is a great language! I just wish there was a native implementation for Windows complete with IDE (not a Prime emulator or virtual Prime).

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
12-12-2017, 01:32 PM (This post was last modified: 12-12-2017 01:33 PM by salvomic.)
Post: #3
RE: The most powerful calculator in the world
(12-12-2017 12:13 PM)akmon Wrote:  ...
Anyway, do you think HP Prime is the best calculator in the world? (take in consideration that v3 beta firmware has been released). If not, which one?

Maybe it isn't the best calculator in the World (and perhaps it is better so, hi), but at the moment is that I love more than other calcs and that is enough for me Smile

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2017, 02:00 PM
Post: #4
RE: The most powerful calculator in the world
(12-12-2017 12:13 PM)akmon Wrote:  Anyway, do you think HP Prime is the best calculator in the world? (take in consideration that v3 beta firmware has been released). If not, which one?
Which calculators with CAS are currently available? TI-Nspire CX CAS, TI-Nspire with Touchpad, TI-89 Titanium, TI Voyage 200, ClassPad fx-CP400, Casio fx-CG500 PRIZM, HP Prime, HP 50g (discontinued). All of these except HP calculators do not have RPN, if calculator do not have RPN, it can not be the best. Remain HP Prime and HP 50g. HP 50g is the best, but it is slow. Easy to understand - HP Prime is the winner.
Find all posts by this user
Quote this message in a reply
12-12-2017, 02:12 PM
Post: #5
RE: The most powerful calculator in the world
(12-12-2017 02:00 PM)Voldemar Wrote:  Which calculators with CAS are currently available? TI-Nspire CX CAS, TI-Nspire with Touchpad, TI-89 Titanium, TI Voyage 200, ClassPad fx-CP400, Casio fx-CG500 PRIZM, HP Prime, HP 50g (discontinued). All of these except HP calculators do not have RPN, if calculator do not have RPN, it can not be the best. Remain HP Prime and HP 50g. HP 50g is the best, but it is slow. Easy to understand - HP Prime is the winner.

correct analysis, I agree.
In the past I used a lot Voyage 200, good calculator, than HP 50g (that still I like much and I use frequently), but the Prime is my preferred, also because it offers in the same place CAS, RPN and Home HPPL stuff and it is enough fast for the jobs I do with it.

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2017, 03:13 PM (This post was last modified: 12-12-2017 03:14 PM by parisse.)
Post: #6
RE: The most powerful calculator in the world
(12-12-2017 12:13 PM)akmon Wrote:  Well, just for curiosity, I googled the title of the thread to see what it shows, and I found a forum saying that TI Nspire CAS was the best. The reason: he tried to do this: solve(a*x^3+b*x^2+c*x+d=0, x) and the calc managed to solve it with a huge expression.

The result is not very profitable, but it served to test a calculator with a very difficult test, and it was successful.
Perhaps it should be a FAQ. solve returns [] for a 3rd or 4rd order generic polynomial on the Prime because the answer would be completly unusable for further computations. The right way to handle solutions of 3rd or larger order equations is algebraic extensions of Q (rootof in Xcas, not available on the Prime).
If you really like complicated useless expressions, it's not hard to write a user program to return the solutions with Cardan (or Ferrari) formula.
Code:

cardan(P,x) := begin
  local b,p,q,d,vv,u,v,x1,x2,x3,n,j; 
  j:=exp(2*i*pi/3);  
  vv:=symb2poly(P,x);  
  n:=size(vv);  
  if n<>4 then return(print(P)+" n'est pas de degre 3");   fi ;  
  vv:=vv/(vv[1]);  
  b:=vv[2];  
  vv:=ptayl(vv,(-b)/3);  
  p:=vv[3];  
  q:=vv[4];  
  d:=q^2/4+p^3/27;  
  if d=0 then return(solve(P,x));   fi ;  
  d:=sqrt(d);  
  u:=((-q)/2+d)^(1/3);  
  v:=(-p)/3/u;  // FIXME if u==0
  x1:=u+v-b/3;  
  x2:=u*j+v*conj(j)-b/3;  
  x3:=u*conj(j)+v*j-b/3;  
  return([x1,x2,x3]);  
end
Find all posts by this user
Quote this message in a reply
12-12-2017, 03:39 PM
Post: #7
RE: The most powerful calculator in the world
(12-12-2017 03:13 PM)parisse Wrote:  
Code:

cardan(P,x) := begin
  local b,p,q,d,vv,u,v,x1,x2,x3,n,j; 
...

Sorry for my ignorance, but local declaration in CAS isn't restricted the same way (eight vars max.) as it is in ordinary non CAS programs?

Prime, 15C CE
Find all posts by this user
Quote this message in a reply
12-12-2017, 04:43 PM
Post: #8
RE: The most powerful calculator in the world
That is correct. Functions in HPPPL are limited to 16 arguments. LOCAL is thus limited to 8 as you have an optional initial argument for each name.

We might change this LOCAL thing at some point as it kind of is an artifact of how we implemented it, but that is why for now. The cas doesn't have this limit as you correctly stated.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
12-12-2017, 06:26 PM
Post: #9
RE: The most powerful calculator in the world
Thank you, Tim!

Prime, 15C CE
Find all posts by this user
Quote this message in a reply
12-12-2017, 10:46 PM
Post: #10
RE: The most powerful calculator in the world
(12-12-2017 12:13 PM)akmon Wrote:  The result is not very profitable, but it served to test a calculator with a very difficult test, and it was successful.

Not that difficult actually (the problem was solved 5 centuries ago), just very tedious.

But I do agree that the Prime should produce a result and leave the decision of whether that result is "usable" or not to the user. To put this in context: it lets me generate Taylor series with hundreds of terms: is that more "usable"?
Find all posts by this user
Quote this message in a reply
12-12-2017, 10:57 PM
Post: #11
RE: The most powerful calculator in the world
"the one that fits the workflow of the user that is using it"

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
12-12-2017, 11:03 PM
Post: #12
RE: The most powerful calculator in the world
(12-12-2017 03:13 PM)parisse Wrote:  
(12-12-2017 12:13 PM)akmon Wrote:  Well, just for curiosity, I googled the title of the thread to see what it shows, and I found a forum saying that TI Nspire CAS was the best. The reason: he tried to do this: solve(a*x^3+b*x^2+c*x+d=0, x) and the calc managed to solve it with a huge expression.

The result is not very profitable, but it served to test a calculator with a very difficult test, and it was successful.
Perhaps it should be a FAQ. solve returns [] for a 3rd or 4rd order generic polynomial on the Prime because the answer would be completly unusable for further computations. The right way to handle solutions of 3rd or larger order equations is algebraic extensions of Q (rootof in Xcas, not available on the Prime).
If you really like complicated useless expressions, it's not hard to write a user program to return the solutions with Cardan (or Ferrari) formula.
Code:

cardan(P,x) := begin
  local b,p,q,d,vv,u,v,x1,x2,x3,n,j; 
  j:=exp(2*i*pi/3);  
  vv:=symb2poly(P,x);  
  n:=size(vv);  
  if n<>4 then return(print(P)+" n'est pas de degre 3");   fi ;  
  vv:=vv/(vv[1]);  
  b:=vv[2];  
  vv:=ptayl(vv,(-b)/3);  
  p:=vv[3];  
  q:=vv[4];  
  d:=q^2/4+p^3/27;  
  if d=0 then return(solve(P,x));   fi ;  
  d:=sqrt(d);  
  u:=((-q)/2+d)^(1/3);  
  v:=(-p)/3/u;  // FIXME if u==0
  x1:=u+v-b/3;  
  x2:=u*j+v*conj(j)-b/3;  
  x3:=u*conj(j)+v*j-b/3;  
  return([x1,x2,x3]);  
end

Let me say an expression in my native languaje: ¡Toma castaña! You managed to solve this difficult test with this little program. The result is a maze, but there it is, a result!
This example has given me a lesson, the most powerful calculator in the world is the most versatile one. All depends the hands (or head) that uses it.
Find all posts by this user
Quote this message in a reply
12-13-2017, 01:10 AM
Post: #13
RE: The most powerful calculator in the world
So, how do you solve 3*x^3+2*x^2+x+d=0 for x?
I can do this manually pretty easy....why can't the cas system do this?
....or should I ask....how do I solve this. I should easily be able to get x in terms of d....what is an HP prime user supposed to do to solve this?
Find all posts by this user
Quote this message in a reply
12-13-2017, 06:59 AM
Post: #14
RE: The most powerful calculator in the world
Run cardan(3*x^3+2*x^2+x+d,x) but don't try to simplify the answer!
By the way I just checked on a nspire: l:=zeros(x^3+x+d,x), then l[1]^3+l[1], you don't get -d back. If you enter l[1]^3+l[1]+d they return 0, this demonstrate that they are cheating:-)
Find all posts by this user
Quote this message in a reply
12-15-2017, 11:56 AM
Post: #15
RE: The most powerful calculator in the world
Ah...LOL. I did try the cardan function and sure enough, I know what you mean now by unusable. :-)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)