## Saturday, August 25, 2018

### HP 15C: Pricing Calculations (Gamo)

HP 15C:  Pricing Calculations (Gamo)

Introduction

The following program is a solver for cost, price, markup, and margin – developed by Gamo, which was emailed to me. The program (shown for the HP 15C).  Program listed here with permission and much thanks and gratitude to Gamo.

HP 11C and HP 15C Program:  Pricing Calculations

Note:  Key codes are for the HP 15C.

 Step Key Code Key Comment 001 42, 21, 11 LBL A Start Cost Routine 002 44, 1 STO 1 003 0 0 004 43, 30, 6 TEST 6, x≠y 005 43, 32 RTN 006 45, 2 RCL 2 007 1 1 008 45, 3 RCL 3 009 43, 14 % 010 40 + 011 10 ÷ 012 43, 32 RTN 013 42, 21, 12 LBL B Start Price Routine 014 44, 2 STO 2 015 0 0 016 43, 30, 6 TEST 6 , x≠y 017 43, 32 RTN 018 45, 1 RCL 1 019 45, 3 RCL 3 020 43, 14 % 021 40 + 022 43, 32 RTN 023 42, 21, 13 LBL C Enter Markup Routine 024 44, 3 STO 3 025 0 0 026 43, 30, 6 TEST 6, x≠ y 027 43, 32 RTN 028 45, 1 RCL 1 029 45, 2 RCL 2 030 43, 15 Δ% 031 43, 32 RTN 032 42, 21, 14 LBL D Margin to Markup routine 033 44, 4 STO 4 034 0 0 035 43, 30, 6 TEST 6, x≠y 036 43, 32 RTN 037 45, 3 RCL 3 038 15 1/x 039 26 EEX 040 16 CHS 041 2 2 042 40 + 043 15 1/x 044 43, 32 RTN 045 42, 21, 15 LBL E Markup to Margin routine 046 44, 3 STO 3 047 0 0 048 43, 30, 6 TEST 6, x≠y 049 43, 32 RTN 050 45, 4 RCL 4 051 15 1/x 052 26 EEX 053 16 CHS 054 2 2 055 30 - 056 15 1/x 057 43, 32 RTN

Registers:

R1 = Cost
R2 = Price
R3 = Markup
R4 = Margin

Instructions:

The program primary runs on the cost-price-markup calculation, which belongs to labels A, B, and C, respectively.

Conversions between margin and markup are used between labels D and E.  Gamo recommends that you set the calculator in FIX 2 mode and press [ f ] (USER) prior to running this program.

This program is set up to be a solver similar to the HP 12C and Hewlett Packard other financial calculators.

Examples

It is assumed that FIX 2 is set and USER mode is turned on.

Example 1: (from Gamo)

Cost = 66.46
Price = 105.00

Keystrokes:

66.46 [ A ]
105.00 [ B ]
[ C ], Markup =  57.99
[ C ] [ D ], Margin = 36.70

Example 2:

Cost = 2500.00
Margin = 10.00

2500 [ A ]
10 [ D ]
[ E ] [ C ] [ B ],  Price = 2777.78

Example 3:

Price = 48.75
Markup = 10.00

48.75 [ B ]
10.00 [ C ]
[ A ], Cost = 44.32

Example 4:  Margin/Markup Calculation

Markup = 54.00

54.00 [ E ]
[ D ],  Margin = 35.06

Eddie

All original content copyright, © 2011-2018.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.  Please contact the author if you have questions.

### HP 20S: Gamma Function Approximation (Stirling's Formula)

HP 20S:  Gamma Function Approximation (Stirling's Formula) Introduction The gamma function uses the approximation sequence: Let t = x + ...