Small RPN exponential routine
01-21-2015, 12:46 AM (This post was last modified: 01-21-2015 12:57 AM by Gerson W. Barbosa.)
Post: #11
 Gerson W. Barbosa Senior Member Posts: 1,429 Joined: Dec 2013
RE: Small RPN exponential routine
(01-21-2015 12:34 AM)Namir Wrote:
(01-20-2015 11:48 PM)Gerson W. Barbosa Wrote:  My HP-16C version:

Code:
 01 g LBL A 02   STO I 03   1 04   STO 0 05 g CLx 06   x<>y 07   ENTER 08   ENTER 09   ENTER 10 g LBL 0 11   RCL 0 12   RCL I 13   * 14   STO 0 15   +  16   * 17 g DSZ 20   GTO 0 19   RCL 0 20   / 21   x<>y 22   / 23 g RTN

Both have approximately the same size and both use Horner's method. My first HP-16C version of Thomas Klemm's more obvious method is only one step shorter, but I surely haven't converted it properly.

Regards,

Gerson.

I think LBL A needs to be followed by an X<>Y command. I am assuming the value for the exponent is in register Y and the number of iterations is in register X. I tried your code on an HP-41C and it worked after inserting X<>Y following LBL A.

Namir

Namir,

On the 16C, 1 ENTER 12 GSB A returns 2.718281829. No x<>y need. I'll try it on the 41C.

Gerson.

P.S.: Instead of X<>Y after LBL A, try

STO 01 ; assuming that's your index register;
SIGN
STO 00
X<>Y
ENTER
ENTER
ENTER
...

Of course converting Thomas Klemm's program to the HP-41C is better.
 « Next Oldest | Next Newest »

 Messages In This Thread Small RPN exponential routine - Gerson W. Barbosa - 01-02-2015, 10:25 PM RE: Small RPN exponential routine - Thomas Klemm - 01-03-2015, 08:42 AM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-03-2015, 10:53 AM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-03-2015, 05:31 PM RE: Small RPN exponential routine - Thomas Klemm - 01-03-2015, 08:33 PM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-04-2015, 01:14 AM RE: Small RPN exponential routine - James Dunn - 01-20-2015, 07:57 PM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-20-2015, 11:48 PM RE: Small RPN exponential routine - Namir - 01-21-2015, 12:34 AM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-21-2015 12:46 AM RE: Small RPN exponential routine - Namir - 01-20-2015, 09:24 PM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-21-2015, 04:03 AM RE: Small RPN exponential routine - Thomas Klemm - 01-21-2015, 02:36 AM RE: Small RPN exponential routine - Thomas Klemm - 01-21-2015, 03:18 AM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-21-2015, 03:48 AM RE: Small RPN exponential routine - Namir - 01-22-2015, 08:41 AM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-22-2015, 06:59 PM RE: Small RPN exponential routine - Namir - 01-23-2015, 05:11 PM RE: Small RPN exponential routine - Gerson W. Barbosa - 01-23-2015, 06:48 PM RE: Small RPN exponential routine - Eddie W. Shore - 01-27-2015, 12:56 PM RE: Small RPN exponential routine - Thomas Klemm - 01-27-2015, 08:52 PM RE: Small RPN exponential routine - Albert Chan - 01-30-2019, 07:21 PM

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