Post Reply 
How to use RPN mode with Functions?
03-03-2017, 12:05 AM
Post: #1
How to use RPN mode with Functions?
Hello - I bought a Prime ages ago but only recently tried to use it. My 15C had been quite sufficient thus far.

Anyway I entered a function definition and then tried to resolve it at the Home screen using Textbook entry, and it was fine.

But when I switch to RPN mode I get a syntax error.

E.g., if I define F1 = X^2 (for example)

Textbook mode, I press Vars and then find the symbolic F1 entry, it shows F1 on the Home screen. Then I press the () key and then enter, say, 5. Then ENTER, and it would resolve to F(5) which is 25.

But RPN mode doesn't work. Gets error.
Find all posts by this user
Quote this message in a reply
03-03-2017, 12:16 AM
Post: #2
RE: How to use RPN mode with Functions?
In RPN entry, you need to place the argument(s) onto the stack. Then you would execute a command using COMMAND(n) where n is the number of arguments used by COMMAND. In this case, your command is F1. In algebraic notation, you would enter F1(5) to get 25. In RPN notation, you would place 5 onto the stack, and type F1(1).

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-03-2017, 12:37 AM
Post: #3
RE: How to use RPN mode with Functions?
(03-03-2017 12:16 AM)Han Wrote:  In RPN entry, you need to place the argument(s) onto the stack. Then you would execute a command using COMMAND(n) where n is the number of arguments used by COMMAND. In this case, your command is F1. In algebraic notation, you would enter F1(5) to get 25. In RPN notation, you would place 5 onto the stack, and type F1(1).

Ok thanks.

So if I define a function with X and Y, then I would enter Y and then X onto the stack, and then type F1(2) to tell it to use the last 2 entered parameters on the stack?
Find all posts by this user
Quote this message in a reply
03-03-2017, 12:52 AM
Post: #4
RE: How to use RPN mode with Functions?
(03-03-2017 12:37 AM)lemontea Wrote:  
(03-03-2017 12:16 AM)Han Wrote:  In RPN entry, you need to place the argument(s) onto the stack. Then you would execute a command using COMMAND(n) where n is the number of arguments used by COMMAND. In this case, your command is F1. In algebraic notation, you would enter F1(5) to get 25. In RPN notation, you would place 5 onto the stack, and type F1(1).

Ok thanks.

So if I define a function with X and Y, then I would enter Y and then X onto the stack, and then type F1(2) to tell it to use the last 2 entered parameters on the stack?

Yes, for a general 2-variable function. Usually, F1 is intended for a single-variable function.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-03-2017, 01:08 AM
Post: #5
RE: How to use RPN mode with Functions?
(03-03-2017 12:52 AM)Han Wrote:  
(03-03-2017 12:37 AM)lemontea Wrote:  Ok thanks.

So if I define a function with X and Y, then I would enter Y and then X onto the stack, and then type F1(2) to tell it to use the last 2 entered parameters on the stack?

Yes, for a general 2-variable function. Usually, F1 is intended for a single-variable function.

Thanks.

But I am thinking maybe I should just use Textbook mode... sad to see RPN go....
Find all posts by this user
Quote this message in a reply
03-03-2017, 02:20 AM
Post: #6
RE: How to use RPN mode with Functions?
Note that specifying argument count only needs to be done when you have a variable number of arguments.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
03-03-2017, 02:53 AM
Post: #7
RE: How to use RPN mode with Functions?
(03-03-2017 02:20 AM)Tim Wessman Wrote:  Note that specifying argument count only needs to be done when you have a variable number of arguments.

I tried not specifying anything and it didn't work.
Find all posts by this user
Quote this message in a reply
03-03-2017, 03:05 AM (This post was last modified: 03-03-2017 03:09 AM by Tim Wessman.)
Post: #8
RE: How to use RPN mode with Functions?
(03-03-2017 02:53 AM)lemontea Wrote:  I tried not specifying anything and it didn't work.

F1 can take a variable number of arguments.

Use the define key, define a named function, and it wouldn't require it. Nor would something like CEIL, SIN, or similar.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)