HP Prime CAS curiosity bluesun08 Member Posts: 207 Threads: 48 Joined: Feb 2010 12-09-2013, 05:48 PM 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). How can i understand this? Thomas Windisch Junior Member Posts: 4 Threads: 2 Joined: Sep 2012 12-09-2013, 05:52 PM I would define any function with: f(x):= Something[x] g(x):= a*x Michael de Estrada Posting Freak Posts: 1,665 Threads: 142 Joined: Jan 2009 12-09-2013, 05:59 PM e=EXP(1) Tim Wessman Posting Freak Posts: 1,278 Threads: 44 Joined: Jul 2007 12-09-2013, 06:03 PM 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 Michael de Estrada Posting Freak Posts: 1,665 Threads: 142 Joined: Jan 2009 12-09-2013, 06:07 PM 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. bluesun08 Member Posts: 207 Threads: 48 Joined: Feb 2010 12-09-2013, 06:28 PM hmm ... suggestion: Let e be a letter (or variable) and if i want the EXP-function, i could type in "EXP". But different people means different opinions about that. You can never satisfy anybody So my suggestion: Let the user decide, how the HP Prime interpret the "e". Make a flag in the settings ... Be brave, Tim, be user-friendly! Michael de Estrada Posting Freak Posts: 1,665 Threads: 142 Joined: Jan 2009 12-09-2013, 08:21 PM 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. Han Senior Member Posts: 709 Threads: 104 Joined: Nov 2005 12-09-2013, 08:24 PM Quote: hmm ... suggestion: Let e be a letter (or variable) and if i want the EXP-function, i could type in "EXP". But different people means different opinions about that. You can never satisfy anybody So my suggestion: Let the user decide, how the HP Prime interpret the "e". Make a flag in the settings ... Be brave, Tim, be user-friendly! 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 user-friendly. Most calculators and computer algebra systems complain when a user tries to use a built-in name as a variable name. The same applies to "e" and "pi" and "i" and other constants pre-defined 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? bluesun08 Member Posts: 207 Threads: 48 Joined: Feb 2010 12-10-2013, 05:36 AM How i said: Different people means different opinions. Therefore my suggestion was: a flag. Why you disagree with a flag in the settings? Han Senior Member Posts: 709 Threads: 104 Joined: Nov 2005 12-10-2013, 01:03 PM Quote: How i said: Different people means different opinions. Therefore my suggestion was: a flag. Why you disagree with a flag in the settings? 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 mid-way, 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. Han Senior Member Posts: 709 Threads: 104 Joined: Nov 2005 12-10-2013, 01:07 PM Quote: 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. 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. Michael de Estrada Posting Freak Posts: 1,665 Threads: 142 Joined: Jan 2009 12-10-2013, 01:20 PM 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 D E T Enter (determinant) and the result shown will be a*e-c*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*e-c*b, even though e entered directly into the stack will now display numerically as 2.7183... Edited: 10 Dec 2013, 1:29 p.m. « Next Oldest | Next Newest »

 Possibly Related Threads... Thread Author Replies Views Last Post HP Prime: CAS taylor Alberto Candel 5 844 12-13-2013, 09:45 PM Last Post: Alberto Candel HP Prime Matrices curiosity bluesun08 0 392 12-09-2013, 06:44 PM Last Post: bluesun08 [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 592 12-07-2013, 07:15 PM Last Post: CompSystems HP Prime: complex numbers in CAS. Alberto Candel 1 488 12-06-2013, 02:36 PM Last Post: parisse HP Prime: Proper Use of Home View and CAS View James Williams 9 1,173 12-05-2013, 02:44 PM Last Post: James Williams [HP Prime] plotfunc() bug in CAS Chris Pem10 2 572 12-04-2013, 02:46 PM Last Post: Chris Pem10 HP Prime: Home/CAS? Alasdair McAndrew 11 1,174 11-26-2013, 02:48 PM Last Post: Alberto Candel HP Prime numerical precision in CAS and HOME Javier Goizueta 5 662 11-16-2013, 03:51 AM Last Post: Paul Dale Need CAS help Michael de Estrada 6 725 11-13-2013, 01:29 AM Last Post: cyrille de Brébisson HP Prime - CAS functions in Spreadsheet App CR Haeger 6 779 11-11-2013, 12:37 AM Last Post: Michael de Estrada

Forum Jump: