-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Archived Topics
- Tablets and Mobile Devices Archive
- HP Prime - erf function

Create an account on the HP Community to personalize your profile and ask a question

11-07-2013 07:37 PM
For HP Prime, when plotting f(x) = erf(x), it gets undefined values for whole integer values of x. That is erf(1) or erf(2) is undefined. No problem with erf(1.1). From Home in RPM mode, I can do 'erf(1.1)', Enter, Eval and get a value. But when I do 'erf(1)', Enter, Eval it just says erf(1). This indicates just like plotting that the erf function can not tolerate integer values. Even if I try 1.0 it still has a problem. It does evaluate 'approx(erf(1))', Enter, Eval. So what is happening? Why would it tolerate 'approx(erf(1))', Enter, Eval but not do anything with 'erf(1)', Enter, Eval?
Also, in RPM mode I can not do 1.1, Enter, erf, Enter. It requires the algebraic mode for this function. Is this the normal scenario for special single argument functions? I am for example able to do 1.1, Enter, sin, Enter where I keyed in sin instead of pressing the SIN key.
Solved! Go to Solution.
Accepted Solutions
11-07-2013 11:47 PM
Hello,
The erf and the other items in the "special" menu actually come from the CAS side of things. Thus when you are doing erf(integer), it keeps it as a symbolic or exact object. The way the CAS in prime works is that a numerical value with a decimal in it is interpreted as a numerical value and thus evaluates numerically. For example, try in the CAS 1/2 vs 1./2 (with the decimal on the 1. In one case, it returns 1/2 and in the other .5
While graphing, the same thing can happen while calling CAS commands. Graphing approx(erf(X)) will draw what you'd like.
Now for RPN, this also has something to do with CAS commands. In the CAS, there truly are no "single" argument commands. You can do things like erf(1,2,3,4,3,4,2,2,3) and it will happily calculate for all of them. This allows you to use common or simple commands in very flexible ways. For example, sin can take whatever number of arguments you pass it and calculate them all. This allows things like seamless passing of vectors of arguments through complicated calculations.
Now while operating in RPN mode, the system recognizes that this command is a CAS command that can take whatever number of arguments you'd like. This is why it does not just immediately calculate the result. Give it a count inside the ( ) to specify the arguments to take from the stack. For example erf(4) would consume 4 arguments and return a vector of results.
Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
11-07-2013 11:47 PM
Hello,
The erf and the other items in the "special" menu actually come from the CAS side of things. Thus when you are doing erf(integer), it keeps it as a symbolic or exact object. The way the CAS in prime works is that a numerical value with a decimal in it is interpreted as a numerical value and thus evaluates numerically. For example, try in the CAS 1/2 vs 1./2 (with the decimal on the 1. In one case, it returns 1/2 and in the other .5
While graphing, the same thing can happen while calling CAS commands. Graphing approx(erf(X)) will draw what you'd like.
Now for RPN, this also has something to do with CAS commands. In the CAS, there truly are no "single" argument commands. You can do things like erf(1,2,3,4,3,4,2,2,3) and it will happily calculate for all of them. This allows you to use common or simple commands in very flexible ways. For example, sin can take whatever number of arguments you pass it and calculate them all. This allows things like seamless passing of vectors of arguments through complicated calculations.
Now while operating in RPN mode, the system recognizes that this command is a CAS command that can take whatever number of arguments you'd like. This is why it does not just immediately calculate the result. Give it a count inside the ( ) to specify the arguments to take from the stack. For example erf(4) would consume 4 arguments and return a vector of results.
Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
11-08-2013 04:10 AM
Wow, thak you! It actually did plot it before, but when looking at the values is when I had noticed the undefined. Regardless, I was quite confused, and now trying it, it works exactly like you described. Its a learning curve thing and or documentation. Because its hard to figure out that it was a multi argument function. That also explains why in RPN mode just entering erf, Enter resulted in [] which is an indicator of null matrix result.
11-08-2013 08:29 AM
As a side note, I've jotted down to revisit these two things because I beleive we can do some things to simplify a bit more here which should result in less possibility for confusion. Thanks for the report/quesiton!
Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
