HP Forums
CAS ? Home issues? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: CAS ? Home issues? (/thread-11952.html)



CAS ? Home issues? - toshk - 12-14-2018 05:33 PM

inverse matrix;
in CAS; [undef] Home; correct ans;
[[(1/2585000000000)*((e^(1/517))^15034+(e^(1/517))^1551),(-1/2585000000000)*e^3,0,(-1/2585000000000)*e^(15034/517),1],[(-1/2585000000000)*e^3,(1/2585000000000)*(e^3+1292500000),-1/2000,0,0],[0,-1/2000,3/2000,-1/2000,0],[(-1/2585000000000)*e^(15034/517),0,-1/2000,(1/2585000000000)*(e^(15034/517)+1292500000),0],[1,0,0,0,0]]^(-1)


also seen issues with LSQ function as well in CAS;


RE: CAS ? Home issues? - parisse - 12-14-2018 07:37 PM

There is an exponent overflow trying to do exact computation (because of the exp()^...). Add a point to any integer and you'll get an answer in CAS. The answer in CAS is a little bit more precise (try to multiply by the original matrix).


RE: CAS ? Home issues? - toshk - 12-14-2018 11:51 PM

(12-14-2018 07:37 PM)parisse Wrote:  There is an exponent overflow trying to do exact computation (because of the exp()^...). Add a point to any integer and you'll get an answer in CAS. The answer in CAS is a little bit more precise (try to multiply by the original matrix).
Thanks,
exp()^......is of order(Is*exp(V/Vth)-1), chosen for the exact numerical computation in CAS. And CAS want approx representation now? The matrix represent here is computation in application and i do not the luxury to add a point. how do i add a point without approx in application?


RE: CAS ? Home issues? - parisse - 12-15-2018 07:03 AM

Run inv(evalf(...))
Or use only rationals. If you are using exp(), computations are done with exp replaced by a formal parameter, computing with polynomials. The degree of polynomial can not be too large otherwise computations would last too long and take too much memory.


RE: CAS ? Home issues? - CyberAngel - 12-15-2018 03:51 PM

(12-15-2018 07:03 AM)parisse Wrote:  Run inv(evalf(...))
Or use only rationals. If you are using exp(), computations are done with exp replaced by a formal parameter, computing with polynomials. The degree of polynomial can not be too large otherwise computations would last too long and take too much memory.
Hiw much RAM would be sufficient?
2GB?
Unknown, depending on the polynomial.
The needed RAM could be calculated,
but it's not feasible to do.


RE: CAS ? Home issues? - parisse - 12-15-2018 05:46 PM

It's not just a question of RAM, I have set an upper bound for degrees in multivariate polynomials (and it must fit in a short signed int anyway).


RE: CAS ? Home issues? - CyberAngel - 12-15-2018 08:03 PM

(12-15-2018 05:46 PM)parisse Wrote:  It's not just a question of RAM, I have set an upper bound for degrees in multivariate polynomials (and it must fit in a short signed int anyway).

I guess that in all algorithms concerning matrices they are typically uncompressed, meaning: all the individual elements or cells occupy memory. It uses more RAM, but saves CPU and uncomplicates the algorithms.