• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended

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.

1 ACCEPTED SOLUTION

Accepted Solutions
HP Recommended

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.

TW

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.

View solution in original post

3 REPLIES 3
HP Recommended

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.

TW

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.
HP Recommended

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.  

HP Recommended

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!

TW

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.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.