HP Prime CAS curiosity  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: HP Prime CAS curiosity (/thread258173.html) 
HP Prime CAS curiosity  bluesun08  12092013 If i define in CAS the function f(x)=a*x^4+b*x^3+c*x^2+d*x+e then f(0)=EXP(1). Re: HP Prime CAS curiosity  Thomas Windisch  12092013 I would define any function with:
f(x):= Something[x] Re: HP Prime CAS curiosity  Michael de Estrada  12092013 e=EXP(1)
Re: HP Prime CAS curiosity  Tim Wessman  12092013 e is the exp function/constant. replace e with some other letter and it will work as expected. I believe it is exactly the same on the 50g if you use the lower e TW
Re: HP Prime CAS curiosity  Michael de Estrada  12092013 It depends on whether you have exact mode checked in the CAS settings or Flag 2 unchecked on the 50g. Then, it will become a symbolic e.
But, yes, better to avoid using reserved constant names like e and i. Edited: 9 Dec 2013, 6:13 p.m.
Re: HP Prime CAS curiosity  bluesun08  12092013 hmm ... suggestion: Let e be a letter (or variable) and if i want the EXPfunction, i could type in "EXP". But different people means different opinions about that. You can never satisfy anybody Re: HP Prime CAS curiosity  Michael de Estrada  12092013 I disagree on this one. Certain letters are universally accepted as constants, and lower case "e" is one of them. Why not let people use the Greek letter pi as an undefined symbolic variable ? The fact is that most people use "e" in formulas to mean the exponential function, just as they use Greek pi to mean 3.14159.... It's no accident that the HP 50g 48S etc all work the same way.
Re: HP Prime CAS curiosity  Han  12092013 Quote: I completely disagree. For the same reason we avoid using "pi" and "i" as variables, users should avoid "e" as a variable as well. Having "e" be a variable does NOT make it userfriendly. Most calculators and computer algebra systems complain when a user tries to use a builtin name as a variable name. The same applies to "e" and "pi" and "i" and other constants predefined in the calculator. The fact that there exists an EXP() function does not change the fact that the letter "e" is generally considered a constant.
If the character "e" should be allowed as a variable, then where does this stop? Why not allow "+" be used as a variable? It's just as valid as a symbol. Do you see where this is going?
Re: HP Prime CAS curiosity  bluesun08  12102013 How i said: Different people means different opinions. Therefore my suggestion was: a flag. Why you disagree with a flag in the settings?
Re: HP Prime CAS curiosity  Han  12102013 Quote: Even with a flag setting, it would be a bad idea. Every time someone runs a program that you wrote that involves 'e', they would have to make sure their settings are correct. Now, maybe you were nice and you actually preserve the user's settings before code execution, and you properly restore it after your code is done. Except if the user ever aborts your program midway, their settings may not necessarily be restored. Another issue with 'e' as a variable is what happens when users use 'e' in their symbolic computations. If a value is stored into 'e', then ln(e) no longer behaves as one would expect because this expression is now ambiguous. The same goes for any named constant in mathematics (e.g. pi). Then your convenience becomes a problem for others (and I would be willing to bet more people would prefer 'e' as a constant only).
If we were somehow artificially limited to only a few variables, I could see why it would be necessary to make a universal mathematical constant behave as a variable. However, this is clearly not the case.
Re: HP Prime CAS curiosity  Han  12102013 Quote:
Flag 2 on the HP50G only affects whether e is converted to its decimal approximation. However, e is still the natural number e and is not allowed as a variable even on the HP50G.
Re: HP Prime CAS curiosity  Michael de Estrada  12102013 Yes, but by setting flag 2 on the HP 50g I can use e purely symbolically if I want to. For example, on the HP 50g, I can create a symbolic matrix [['a','b'],['c','e']], and it will display as a 2x2 matrix with symbolic elements a,b,c,e. I can then enter it on the stack and type <alpha> D E T Enter (determinant) and the result shown will be a*ec*b. Furthermore, once I have created this matrix with e as a symbol, it will remain so in the matrix even if I clear flag 2, such the determinant will still evaluate to a*ec*b, even though e entered directly into the stack will now display numerically as 2.7183...
Edited: 10 Dec 2013, 1:29 p.m.
