HP Forums

Full Version: How to store exact symbolic results in preconfigured lists L#
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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)
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.
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
Reference URL's