Post Reply 
The most powerful calculator in the world
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
Post Reply 


Messages In This Thread
RE: The most powerful calculator in the world - akmon - 12-12-2017 11:03 PM



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