HP Forums
How to store exact symbolic results in preconfigured lists L# - 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: How to store exact symbolic results in preconfigured lists L# (/thread-1831.html)



How to store exact symbolic results in preconfigured lists L# - Alberto Candel - 07-15-2014 05:01 PM

Is it possible? For example, v:=e^(2*pi*i/3) is a cubic root of 1, so v^3=1. But L1:=seq(v^k,k=0..3) will return L1(4)=1+3.5527136788e-15i instead of 1.


RE: How to store exact symbolic results in preconfigured lists L# - Nigel (UK) - 07-15-2014 09:24 PM

I get the same result as you: I'm using the emulator, I'm in CAS mode and "exact" is ticked. However, if I store the list {v,v^2,v^3} into a CAS variable (e.g., l1) then l(3) is 1. This is reasonable - as I understand it, Home variables (like L1) can only contain numbers while CAS variables can contain expressions.

After typing
Code:

L1 := seq(Simplify(v^k),k,1,3)
L1(3) is exactly 1. It seems that the routine used to convert a CAS expression into a number for the Home screen does not itself call Simplify. I can understand this - to simplify a complicated expression might take a long time.

Nigel (UK)


RE: How to store exact symbolic results in preconfigured lists L# - Alberto Candel - 07-15-2014 10:04 PM

Thanks. But L1:=seq(simplify(v^k),k=0..3) will now return L1(3)=-0.5-0.866025403784*i instead of (1/2)*(-1+sqrt(3)*-i). I guess one has to make lists in CAS for symbolic display.


RE: How to store exact symbolic results in preconfigured lists L# - cyrille de brébisson - 07-17-2014 05:39 AM

Hello,

You can store equations in Home lists.

for example:
L1:={'PV','RNT'}

You can then eval(L1(1))

What you can not do is store a function of parameters in L1 as there is no way in home to define such a thing...

cyrille