Post Reply 
HP-65 Financial Software request
01-07-2019, 04:26 PM (This post was last modified: 01-07-2019 11:24 PM by Dieter.)
Post: #5
RE: HP-65 Financial Software request
(01-07-2019 02:38 PM)albertofenini Wrote:  I would like to implement on an HP-65 a software program that given any two of these three values : Cost, Sell, Margin will give in return the third one.
It is a very common function on a Financial Calculator and I'd like to have it on the HP-65
Does anyone has ever done something similar and would like to share ?

That's nothing that could not be done within a few minutes. But I would not call this "financial software". ;-)
Here is a possible solution:

Edit: the listing has been corrected.
I forgot that the x≠y? test skips two steps (and not one) if false, so three NOPs had to be added. Also a missing RTN was added.

Code:
LBL       23
A         11
STO 1     33 01
0         00
g x≠y?    35 21
RTN       24
g NOP     35 01
RCL 2     34 02
RCL 2     34 02
RCL 3     34 03
x         71
EEX       43
2         02
÷         81
-         51
STO 1     33 01
RTN       24
LBL       23
B         12
STO 2     33 02
0         00
g x≠y?    35 21
RTN       24
g NOP     35 01
RCL 1     34 01
1         01
RCL 3     34 03
EEX       43
2         02
÷         81
-         51
÷         81
STO 2     33 02
RTN       24
LBL       23
C         13
STO 3     33 03
0         00
g x≠y?    35 21
RTN       24
g NOP     35 01
1         01
RCL 1     34 01
RCL 2     34 02
÷         81
-         51
EEX       43
2         02
x         71
STO 3     33 03
RTN       24
LBL       23
E         15
DSP       21
.         83
2         02
CLx       44
STO 1     33 01
STO 2     33 02
STO 3     33 03
RTN       24

Initialize (clear all three values) with [E].
Use [A] for cost, [B] for price and [C] for margin.
Rule: enter the unknow value as zero.

Example: cost=40, price=50, margin=?

Start: [E] => 0,00

40 [A] => 0,00
50 [B] => 0,00
     [C] => 20,00

So the margin is 20%.
Note that there was no need to enter zero as the display already was 0,00.

What if the margin is increased to 25%?

25 [C] => 0,00
     [B] => 53,33

So the price has to be raised to 53,33.

Does this work for you?

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP-65 Financial Software request - Dieter - 01-07-2019 04:26 PM



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