Precision problem with matrix inversion
07-17-2015, 08:18 AM
Post: #21
 parisse Senior Member Posts: 1,317 Joined: Dec 2013
RE: Precision problem with matrix inversion
FYI, I have eventually checked from inside CAS.
Code:
a:=[[130.2544e9,34.4351e9,17.1192e9,10.4385e9], [55.2158e9,32.7918e9,18.5083e9,11.6938e9], [26.9576e9,29.2367e9,22.0630e9,15.2900e9], [17.8132e9,25.8109e9,27.0660e9,21.6890e9]]; b:=400e3*[1,1,1,1]; linsolve(a,b)
returns the correct answer, as well as inv(a)*b. The CAS does not support the b/a notation because the CAS parser translate / to inv, here to b*inv(a).
If you do linear algebra, I would recomment to be inside CAS, because except for a few operations (matrix * and inverse, perhaps a few more, Cyrille could confirm), HOME matrices are converted to CAS matrices and giac algorithms are called. The constraints for Cyrille inside HOME (perhaps for learning apps like the linear system solver with HOME approx data but expecting exact results at the end) are not the same as for giac inside the CAS where the user is expected to understand the underlying maths, rounding to 0 for example might explain wrong results. Since RPN users are probably mastering the maths, the conclusion is perhaps that it would be a good idea to support RPN inside CAS.
07-17-2015, 09:07 AM
Post: #22
 Dirk. Junior Member Posts: 41 Joined: Mar 2015
RE: Precision problem with matrix inversion
Quote: ... the conclusion is perhaps that it would be a good idea to support RPN inside CAS.

... some support for RPN in the CAS sounds like a good idea, since this might give a more convenient/natural work-flow for people not used to "normal" programming languages.
 « Next Oldest | Next Newest »

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