# HP-15c Program Index

## Contents

Use the browser "back control" to return here.

## Introduction

The following programs and program compilations have been prepared using Torsten Manz's HP-15c Simulator and Smultron a programming editor for macOS.

Bike1, BisecnewtP, Composite, Maths1, Maths2, Physics1 and ToolkitP are collections of smaller programs. In each case, calling the appropriate label will run the desired program. Themes include Maths, Cycling, Spectroscopy and Physics. Use the references in the documentation to find the original programs.

Collections can be created using a simple text editor by cutting and pasting smaller programs into one file. The line numbering will be fixed once the Simulator saves the composite file. Documentation can be combined in a similar way, mostly by pasting lines beginning with #D: and adding new headings. Normally documentation is created with the Simulator editor and a final edit would be done there.

There are of course more modern ways to solve all these problems, including spreadsheets such as Excel and Numbers. Graphing calculators are inexpensive and useful. Tools such as Mathematica, Maple, Matlab and programs in languages such as Python are popular. Entering a formula in a web browser toolbar will lead to sites which can solve equations online. My only defence is that these programs really do fit in my shirt pocket with ease, using my DM15 calculator from SwissMicros.

In many cases I have included information about how the programs actually work. For my solvers I have included spreadsheets as part of the download.

## Bike1 - 4 Programs - J E Patterson

Bike1 - 4 Programs - Documentation

EbikeMax - Ebike maximum speed from motor rpm - J E Patterson
Enter motor rpm. Enter wheel size in inches or mm - the program works out if the units are inches or mm from the magnitude. GSB 7. The maximum speed at 36 volts is displayed. Press R/S. The maximum speed at 42 volts is displayed.

Bike Power - J E Patterson
This program calculates the power in watts required for a given bike speed.

Bike Development - J E Patterson
Enter wheel diameter in inches or mm - the program works out if the units are inches or mm from the magnitude. Enter front sprocket teeth number. Enter rear sprocket teeth number. GSB 9 returns Gear-Inches. R/S returns Metres-Development. R/S returns Gain-Ratio for a 170 mm crank arm

Bike Speed - J E Patterson
Run Bike Development first. Enter cadence in RPM. GSB D. The bike speed in km/h is returned

## BisecnewtP - 3 Solvers - J E Patterson

BisecnewtP - Documentation

I have combined the BisectionP, SecantP and Newton-Raphson routines into one program. The three solvers in this program have their own particular strengths. With the additional choice of the built-in solver in the HP-15C Simulator solutions to most root finding problems can be found. This program is suitable for some calculators which don't include the HP Solver.

GSB A runs a Bisection solver which acts on f(x) = 0 under label E. Two guesses for x are required.

GSB B runs a Secant solver which acts on f(x) = 0 under label E. Two guesses for x are required.

GSB C runs a Newton-Raphson solver which acts on f(x) = 0 under label E. One guess for x is required.

Apple Numbers and Microsoft Excel versions of these solvers are included in the download.

## BisecnewtP2 - 4 Solvers - J E Patterson

BisecnewtP2 - Documentation

I have combined the BisectionP, SecantP and Newton-Raphson routines into one program. SOLVE is also included. The four solvers in this program have their own particular strengths. With the additional choice of the built-in solver in the HP-15C Simulator, solutions to most root finding problems can be found. Initial guesses can also be recovered using RCL 1 and RCL 2.

GSB A runs a Bisection solver which acts on f(x) = 0 under label E. Two guesses for x are required.

GSB B runs a Secant solver which acts on f(x) = 0 under label E. Two guesses for x are required.

GSB C runs a Newton-Raphson solver which acts on f(x) = 0 under label E. One guess for x is required.

GSB D runs the internal SOLVE program which acts on f(x) = 0 under label E. Two guesses for x are required.

Apple Numbers and Microsoft Excel versions of the three programmed solvers are included in the download.

## BisecnewtP3 - 4 Solvers with single entry of guesses - J E Patterson

BisecnewtP3 - Documentation

I have combined the BisectionP, SecantP and Newton-Raphson routines into one program. The built-in SOLVE is also included. The four solvers in this program have their own particular strengths. With the additional choice of the built-in solver in the HP-15C Simulator, solutions to most root finding problems can be found. This program offers an alternative way of using solvers to find the roots of equations.

GSB A Two entered guesses for x are recovered from the stack and stored in memory. Initial guesses can also be recovered using RCL 1 and RCL 2.

GSB B runs a Bisection solver which acts on f(x) = 0 under label 0. Two guesses for x are recovered from memory.

GSB C runs a Secant solver which acts on f(x) = 0 under label 0. Two guesses for x are recovered from memory.

GSB D runs a Newton-Raphson solver which acts on f(x) = 0 under label 0. One guess for x is recovered from memory. The initial guess can be recovered using RCL 1.

GSB E runs the internal SOLVE program which acts on f(x) = 0 under label 9. Two guesses for x are recovered from memory.

Apple Numbers and Microsoft Excel versions of the three programmed solvers are included in the download.

## BisectionP Solver - J E Patterson

BisectionP - Documentation

GSB A runs a bisection solver which acts on f(x) = 0 under label E. This program is suitable for some calculators which don't include the HP Solver.

Apple Numbers and Microsoft Excel versions of Bisection, Secant and Newton-Raphson solvers are included in the download.

## Composite - 12 programs - J E Patterson

Composite - 12 programs - Documentation

CurveP - J E Patterson
The program fits data that may be linear at low x,y amplitudes but y falls off at higher x values. This is a common issue in many physical systems.

TVM - Accurate TVM - Jeff Kearns
Store known values in nominated registers and solve for the variable not entered. f SOLVE E for example.

HgCalP - J E Patterson
The concentration of mercury vapour in air, above liquid mercury, depends on the temperature. A good calibration curve can be obtained using a simplified Dumarey equation.

RGCalP - J E Patterson
RAIN GAUGE calibration in mm per bucket tip, given the number of bucket tips, the diameter of funnel in mm and the calibration volume of water in ml.

Parallel Resistances - J E Patterson
First resistance, press ENTER, second resistance GSB 3 for parallel resistance result.

Quadratic Equation Solver program for the HP-15c - from Torsten Manz
This program finds the roots of a quadratic equation of the form ax2 + bx + c = 0.

Convert to Fraction - Guido Socher
Let's say you would like to know what 0.15625 as a fraction is. You type: 0.15625 GSB 5. The display shows "running" and then you see first 5, and then a second later, 32 The fraction is therefore 5/32 (numerator = 5 and denominator = 32).

Solve a System of Linear Equations - J E Patterson
N GSB 6 where N is the number of equations (8 or less). A N N is displayed. Matrix [A] has a dimension of NxN. Enter the coefficients of xi where i has values from 1 to N. Press R/S after each is entered. B N 1 is displayed. Matrix [B] has a dimension of Nx1. Enter the constants. Press R/S after each is entered. C N 1 is displayed. Matrix [C] has a dimension of Nx1. Values for xi are read out in turn by pressing R/S.

EbikeMax - Ebike maximum speed from motor rpm - J E Patterson
Enter motor rpm. Enter wheel size in inches or mm - the program works out if the units are inches or mm from the magnitude. GSB 7. The maximum speed at 36 volts is displayed. Press R/S. The maximum speed at 42 volts is displayed.

Bike Power - J E Patterson
This program calculates the power in watts required for a given bike speed.

Bike Development - J E Patterson
Enter wheel diameter in inches or mm - the program works out if the units are inches or mm from the magnitude Enter front sprocket teeth number. Enter rear sprocket teeth number. GSB 9 returns Gear-Inches. R/S returns Metres-Development. R/S returns Gain-Ratio for a 170 mm crank arm

Function tests - J E Patterson
N STO 2 GSB 0 for N iterations. N is the number of iterations required otherwise there is only one iteration. My Simulator result is 3736036.572 with 10,000 iterations in 56 seconds. My DM15 result is 3736036.611 with 100 iterations in 67 seconds.

## CurveP - J E Patterson

CurveP - Curve Fitting - Documentation

The program fits data that may be linear at low x,y amplitudes but y falls off at higher x values. This is a common issue in many physical systems. x1, y1 should preferably be on the linear part of the curve. CurveP is not a regression. It assumes that the data is reasonably precise. Linear and power fit data sets also work well.

## DiophantineP - Sum of 3 Cubes - J E Patterson

DiophantineP - Pseudo Diophantine equation - sum of 3 cubes zip-file - Download
DiophantineP - Pseudo Diophantine equation - sum of 3 cubes - Documentation

#### Introduction

Published 3 cubes solutions can be derived from just a few least significant digits of, what can sometimes be extremely large, numbers. This 37 step program calculates the sum of cubes for 3 such numbers using just the 3 least significant digits in each term.

Numbers are truncated to three digits using FRAC. Negative numbers are complimented by having 1000 added to them to make a new positive number. This term is adjusted so the number of zeros = the number of significant digits, 3 in this case. Each 3 digit number is cubed and then they are summed. Finally the result is again truncated to 3 digits, using FRAC, leaving just the published 3 cubes sum.

This little discovery is probably obvious to mathematicians, but I found it interesting.

It was also interesting to not truncate the final sum. Using two digits from the example below the result is 50742. Using three digits the result was 387848042. Using four digits the result was 668216100042. At this point the significant digit range of the HP-15c is exceeded so this was calculated using Thomas Okken's Free42 simulator.

Another option is to use Wolfram Alpha. For example 751458175153 + (100000000000 - 38812075974)3 + 232973356313 = 666070721166961397611075000000042. The number of zeros seen increases to just 15 when all the significant digits are in place, producing 529784370469658641488703464414602800000000000000042. Removing the now fully expanded 100000000000000000 leaves a result of 42.

Taking simple cubes produced sums ending in 058 for two digits, 9958 for three, 0042 for four and 99958 for five digits.

#### Example

Enter the last 3 digits (or more) of each number including the sign. The 3 numbers are now in x, y and z on the stack.

GSB A

The sum of cubes is displayed. This program produces the same results as a full summation of cubes for sums less than 1000.

804357581458175153−805387388120759743+126021232973356313 = 42

7515 ENTER
5974 CHS ENTER
5631 GSB A
42 is displayed

#### Free42 Program

I have also included a Free42 program which calculates the 3 cubes problem in full with a few exceptions, where FRAC helps to extract the solution. This seems to work in most cases. The cut and paste capability of Free42 helps with entering large numbers. Torsten Manz's HP-15c Simulator also has this capability.

It has been claimed that Free42 and the SwissMicros DM42 could not do the 3 cubes sum for 42. Of course, with the correct programming they can. This is really a demonstration that such numbers can be processed, albeit in the wrong direction.

The Free42 program splits each long integer x and calculates x3 = (a + b)3 = a3 + 3(a2b + b2a) + b3. The 3 equations are summed from the largest terms to the smallest. Calculating this way means the sum of cubes for 42 will just fit if the last negative b terms are also complimented into a positive number by adding 1E9, and 1E9 is subtracted for each first a term.

Diophantine.rtf now has documentation and details about the labels and registers used. The program listing or dioph.raw can be dropped onto the FREE42 program window. The program is installed after existing programs. Diop.rtf and Diop.raw duplicates the HP-15c program above for the HP-42s, Free42 and the DM15c.

I last did number splitting in 1968 on a Sanyo printing calculator with 32 programming steps and a few registers. I was able to program a linear regression in that space. Numbers were separated by several zeros which acted as guard digits. Some business calculators of that time had many display digits to attract abacus or Soroban users. My Soroban has 23 digits.

Enter the three integers onto the stack complete with signs. Stack registers z, y and x now hold integers which, in the case of the 42 result, are 17 digits long. XEQ DIAPH will show 42 as the sum of the three cubed integers.

The links below are representative of many on this subject. The first is a research paper by Andrew Booker for the number 33. The second is a general article about the solution for 42 which has better researched content than most.

## HP-15c Program Examples - Documentation

Polygon inscribed in circle - J E Patterson
N sided polygon with side length L inscribed in circle diameter D.

CurveP - J E Patterson
The program fits data that may be linear at low x,y amplitudes but y falls off at higher x values. This is a common issue in many physical systems. x1, y1 should preferably be on the linear part of the curve. CurveP is not a regression. It assumes that the data is reasonably precise. Linear and power fit data sets also work well.

Dumarey equation. Mercury vapour standard concentration ng/ml - J E Patterson
Enter temperature in °C of mercury calibration vessel, GSB A The mercury vapour concentration in air is displayed in ng/ml

Ebike maximum speed from motor rpm - J E Patterson
Enter motor rpm. Enter wheel size in inches or mm. Press GSB A.

Fibonacci Number - J E Patterson
N GSB A for Nth Fibonacci number.

Function tests - J E Patterson
N STO 2. GSB 7 for N iterations.

Mercury vapour standard concentration ng/ml - J E Patterson
The concentration of mercury vapour in air, above liquid mercury, depends on the temperature. A good calibration curve can be obtained using a simplified Dumarey equation.

Little Gauss formula for the HP-15c - J E Patterson
The sum of integers up to n are calculated.

Parallel Resistances - J E Patterson
First resistance ENTER. Second resistance GSB A. Result = parallel resistance.

RainGaugeCalP - J E Patterson
Tipping Bucket Rain Gauge calibration given volume of water in ml, number of tips and diameter of funnel in mm.

HP-15c random number simulator - J E Patterson
This program generates the same values as the HP-15c RAN# function. There are not enough digits to do this directly so some programming effort is needed to get the right result. The techniques used here may be of use elsewhere.

Random7 Repeat RAN# n times - J E Patterson
This program shows the limitations of a pseudo-random number generator. There are patterns, the most notable being the gradual revealing of the original seed value. The random number sequence repeats after 1E10 numbers have been generated.

StrayLightP - Stray light curve correction - J E Patterson
Spectrophotometers have some stray light or detector dark current which causes the calibration to be non linear at high absorbances. This program corrects for the calibration curvature caused by the presence of stray light.

Test many functions - J E Patterson
Function test - Simulator final result is 3736036.572. DM15 is 3736036.611

## HP-15c Owner's Handbook - Documentation

Calculate time an object takes to fall to the ground
HP-15c Owner's Handbook - Pages 14-16.

Mother's Kitchen, a canning company
HP-15c Owner's Handbook - Pages 70-74.

HP-15c Owner's Handbook - Pages 93-94.

Slope of a secant line
HP-15c Owner's Handbook - Pages 102-103.

Solve a system of linear equations
HP-15c Owner's Handbook - Pages 138-140 - General version - up to 8 equations each with 8 coefficients and 1 constant.

Solve a system of linear equations
HP-15c Owner's Handbook - Pages 138-140 - Random version - up to 8 equations each with 8 coefficients and 1 constant.

Solving a system of linear equations
HP-15c Owner's Handbook - Pages 138-140 - 2 equation example.

Cabbages and broccoli
HP-15c Owner's Handbook - Pages 157-159. Cabbages and broccoli are sold. Total weekly weight, total weekly value and the price per kg of each are known. The program enters the sales data over 3 weeks and outputs the total weights of each vegetable, for each week, in matrix [D].

Complex Matrix Transformations
HP-15c Owner's Handbook - Pages 163-168.

Electric circuit analysis
HP-15c Owner's Handbook - Pages 169-171.

Matrix function tests
HP-15c Owner's Handbook - Pages 177-179.

Solve Example program for the HP-15c
HP-15c Owner's Handbook - Pages 181-184.

Throwing a ridget
HP-15c Owner's Handbook - Pages 184-186.

Open-top box form problem
HP-15c Owner's Handbook - Pages 189-190. Using a rectangular piece of sheet metal 4 decimetres by 8 decimetres, an open-top box having a volume of 7.5 cubic decimetres is to be formed. How should the metal be folded? (A taller box is preferred to a shorter one.)

## HP-15c Advanced Functions Handbook - Documentation

Arctic explorer Jean-Claude Coulerre in anticipation of the sun's reappearance
See "HP-15c Advanced Functions Handbook" pages 13-16. for the description of this example.

Design of a vertical broadcasting tower
See "HP-15c Advanced Functions Handbook" pages 18 - 21. for the description of this example.

Discounted cash flow analysis
See "HP-15c Advanced Functions Handbook" pages 34-38. This program performs two kinds of discounted cash flow analysis: net present value (NPV) and internal rate of return (IRR). It calculates NPV or IRR for up to 24 groups of cash flows.

Special functions for any argument x
See "HP-15c Advanced Functions Handbook" pages 51-55. The program calculates the values of four special functions for any argument x:

• P(x): Normal distribution function
• Q(x): Complementary normal distribution function
• erf(x): Error function
• erfc(x): Complementary error function

Using Complex Mode
See "HP-15c Advanced Functions Handbook" page 56-58. A program that evaluates the continued-fraction approximation.

Calculating the nth Roots of a Complex Number
See "HP-15c Advanced Functions Handbook" page 67-69.

Solving an Equation for Its Complex Roots
See "HP-15c Advanced Functions Handbook" page 69-72.

## HP-15c Matrix test routines - Documentation

Matrix Example test 0 - Function test - J E Patterson
Tests f MATRIX 0 to f MATRIX 9 functions. Scalar operations 2 x, 1 -, 2 + and 10 ÷. Matrix multiplication and division.

Matrix Example test 0b - Function test - J E Patterson
This program uses 1 as a random number seed so the same results are always obtained. Tests f MATRIX 0 to f MATRIX 9 functions. Scalar operations 2 x, 1 -, 2 + and 10 ÷. Matrix multiplication and division. HP-15c Owner's Handbook - Pages 181-184

## HP-15c Owner's Handbook Matrix examples - Documentation

Solving a system of linear equations
Matrix Example 1, HP15c Owner's Handbook - Pages 138-140

Complex matrix in Zc form converted to Zp partitioned form
Matrix Example 2, HP15c Owner's Handbook - Pages 163-168.

Electric circuit calculation
Matrix example 3, HP15c Owner's Handbook - Pages 169-171.

Make an identity matrix
Matrix Example 4, HP15c Advanced Functions Handbook Page 100.

Matrix Example test 5, Function test
Matrix example 5. Tests MATRIX 0 to MATRIX 9 functions. Scalar operations 2x, 1-, 2+ and 5÷. Matrix multiplication and division

Matrix Example test 5b, Function test
Matrix example 5b. I have used random number entry to avoid problems with matrices containing numbers derived from 1, 2, 3, 4 etc which makes the intervals between derived numbers in other Matrices the same. This causes problems with some operations. I saved a copy of [C] in [E] for later use. This avoids problems with the LU form.

Cabbages and broccoli
Matrix example 6 - HP-15c Owner's Handbook - pages 157-159. Cabbages and broccoli are sold. Total weekly weight, total weekly value and the price per kg of each are known. The program enters the sales data over 3 weeks and outputs the total weights of each vegetable, for each week, in matrix [D]

Simple matrix divide test
Matrix example 7

Matrix division
Matrix example 8. Matrix division [A]/[A] returns a close approximation to the identity matrix.

## InductanceP

InductanceP - Documentation

This program calculates the inductance L (μH) of a coil using a 50 ohm output signal generator and an oscilloscope. See A Simple Method to Measure Unknown Inductors by Ronald Dekker. This version accounts for inductor resistance using a modified equation by Karen Orton.

The signal generator output amplitude is first measured at about 20,000 kHz using an oscilloscope. The unknown inductor is then connected across the signal generator output and the frequency f (kHz) is adjusted until the oscilloscope shows a reading of half the original amplitude.

On a digital oscilloscope I prefer to take rms readings as they are more stable than peak to peak readings.

The equation is quite simple: L =1000*√(21.11 + 0.84R - 0.025R2)/f.
If R is close to zero ohms the equation reduces to L = 4594/f.

R (ohms) ENTER
f (kHz) GSB A
The result is L (μH)

## Maths1 - 8 Programs

Maths1 - 8 Programs - Documentation

CurveP - J E Patterson
The program fits data that may be linear at low x,y amplitudes but y falls off at higher x values. This is a common issue in many physical systems. x1, y1 should preferably be on the linear part of the curve. CurveP is not a regression. It assumes that the data is reasonably precise. Linear and power curves can be fitted, as well.

Prime Factorisation - Eddie Shore
N GSB C for prime factors of N

Little Gauss formula for the HP-15c - J E Patterson
The sum of integers up to n are calculated.

TVM - Accurate TVM - Jeff Kearns
Store known values in nominated registers and solve for the variable not entered. f SOLVE E for example.

Quadratic Equation Solver program for the HP-15c - from Torsten Manz
This program finds the roots of a quadratic equation of the form ax2 + bx + c = 0.

Convert to Fraction - Guido Socher
Let's say you would like to know what 0.15625 as a fraction is. You type: 0.15625 GSB 5 The display shows "running" and then you see first 5, and then a second later, 32 The fraction is therefore 5/32 (numerator = 5 and denominator = 32).

Solve a System of Linear Equations - J E Patterson
N GSB 6 where N is the number of equations (8 or less). A N N is displayed. Matrix [A] has a dimension of NxN. Enter the coefficients of xi where i has values from 1 to N. Press R/S after each is entered. B N 1 is displayed. Matrix [B] has a dimension of Nx1. Enter the constants. Press R/S after each is entered. C N 1 is displayed. Matrix [C] has a dimension of Nx1. Values for xi are read out in turn by pressing R/S.

Nth-degree Polynomial Fitting - Valentín Albillo
N GSB 4 to start the program where N<8. 1.0000 is displayed, this is a prompt to enter x value for the first data point. At xn+1 the prompt returns to 1.0000 so enter the first y data point. At yn+1 R/S returns a0 Repeat R/S to get all the polynomial coefficients up to an.

## Maths2 - 12 Programs

Maths2 - 12 Programs - Documentation

Gaussian Integration - Valentín Albillo
Enter equation code between LBL . 1 and RTN Store the number of sub-intervals in Register I. N must be an integer number equal or greater than 1. The larger N, the more precise the result will be and the longer it will take to run. N STO I. Enter limit a ENTER and limit b. GSB A. The integral is displayed.

Decimal to Fraction - Joseph Horn
Converts any positive decimal number to a fraction. Accuracy is controlled by the current FIX setting.

Base Conversion - Thomas Klemm
This program allows the conversion of numbers from one base to another.

Prime Factorisation - Eddie Shore
N GSB C for prime factors of N

Numerical Derivative - Eddie Shore
Calculate numerical derivatives of f(x).

Modulo - Gamo
x mod y = x – y*int(x/y) is more accurate than the alternative x mod y = y*frac(x/y) which displays roundoff errors.

Big Factorial program for the HP-15c - Torsten Manz
This program computes the factorial of large numbers up to 1x108.

2D Coordinate Rotation - Eddie Shore
Store the following: X in R4, Y in R5, and θ in R3. Run the program - GSB 2. Results are stored in R6 and R7, for X’ and Y’, respectively. X’ is displayed first, press R/S to get Y’.

Stair Calculation - Eddie Shore
Store riser height in R0 (RH). Store horizontal run in R1. Store vertical rise in R2 GSB 3 displays number of stairs (S). R/S displays tread-width (TW). R/S displays stringer length (ST)

Triangle Solution provided 2 sides and 1 angle - Gamo
Find the 3rd side and 2 remaining angles.

RNEAR - Round to nearest 1/n - Eddie Shore, Dieter. Modified for HP-15c - J E Patterson.
The program RNEAR rounds a number x to the nearest 1/n

Hyperfocal Distance - Gamo, Dieter.
Hyper-focal Distance is the closest distance setting at which a lens should be focused while still keeping everything, from half the hyper-focal distance to infinity, sharp.

## Mercury vapour standard concentration ng/ml - J E Patterson

HgCalP - Calibrate Mercury Analyser - Documentation

The concentration of mercury vapour in air, above liquid mercury, depends on the temperature. A good calibration can be obtained using a simplified Dumarey equation. Reference: R. Dumarey, E. Temmerman, R. Dams, J. Hoste, Analyst. Chim. Acta 170, 337 (1985).

## NewtonP - Newton-Raphson Solver - J E Patterson

NewtonP - Newton-Raphson Solver - Documentation

GSB A runs a Newton-Raphson solver which acts on f(x) = 0 under label E. A single guess is required. This program is suitable for some calculators which don't include the HP Solver.

Apple Numbers and Microsoft Excel versions of Bisection, Secant and Newton-Raphson solvers are included in the download.

## Physics1 - 8 Programs - Dr. D G Simpson

Physics1 - 8 Programs - Documentation

1. Projectile Problem - Dr. D G Simpson
This program solves the following projectile problem: given a target sitting on a hill at coordinates (xt, yt) and a cannon at the origin with muzzle velocity vc. At what angle should the cannon be aimed to hit the target? The solution is found numerically using Newton’s method.

2. Kepler’s Equation - Dr. D G Simpson
Given the mean anomaly M (in degrees) and the orbit eccentricity e, this program solves Kepler’s equation M = E - e sin E to find the eccentric anomaly E.

3. Hyperbolic Kepler’s Equation - Dr. D G Simpson
Given the mean anomaly M (in degrees) and the orbit eccentricity e, this program solves the hyperbolic Kepler equation M = e sinh(F) - F to find the hyperbolic eccentric anomaly F .

4. Barker’s Equation - Dr. D G Simpson
Given the constant K = √GM/2q3 (t - Tp) this program solves Barker's equation tan (f/2) + 1/3 tan3(f/2) = √GM/2q3 (t-Tp) to find the true anomaly f.

5. Reduction of an Angle - Dr. D G Simpson
This program reduces a given angle to the range (0, 360°) in degrees mode, or (0, 2π) in radians mode. It will work correctly whether the calculator is set for degrees or radians mode.

6. Helmert’s Equation - Dr. D G Simpson
Given the latitude θ (in degrees) and the elevation H (in meters), this program uses Helmert's equation to find the acceleration due to gravity g.

7. Pendulum Period - Dr. D G Simpson
Given the length L and amplitude θ° of a simple plane pendulum, this program finds the exact period T , using the arithmetic-geometric mean method.

8. 1D Perfectly Elastic Collisions - Dr. D G Simpson
Given the masses m1 and m2 of two bodies and their initial velocities v1i and v2i, this program finds the post-collision velocities v1f and v2f.

## ReactanceP - Reactance calculations, inductor turns - J E Patterson

ReactanceP - Reactance calculations, including inductor turns - Documentation

This program calculates solutions to common reactance problems and also allows an inductor to be specified. Solver is not needed to do reactance calculations. The equations can be solved directly. The advantage with using Solver is that programs can be shorter. The equations which follow are all used in this program. An unknown variable C, L or f can be calculated by entering it as zero.

• C = 1/(4𝛑2Lf2) capacitance in farads
• L = 1/(4𝛑2Cf2) inductance in henrys
• f = 1/(2𝛑√(LC)) frequency in hertz
• Xc = 1/(2𝛑fC) capacitive reactance in ohms
• Xl = 2𝛑fL inductive reactance in ohms
• T = 5040√((18*d +40*l)L)/d calculate coil turns given inductance L (henrys), coil diameter d (mm) and coil length l (mm).
• T ≈ 45000√(L/d) for coils with a 2:3 ratio of diameter d (mm) to length. L is in henrys.

The factor 5040 in front of the standard Wheeler formula corrects for henrys instead of microhenrys (1000) and mm instead of inches (5.04). This factor was wrongly set at 1000 in the initial version of this program.

## SecantP - Solver - J E Patterson

SecantP - Documentation

GSB A runs a secant solver which acts on f(x) = 0 under label E. This program is suitable for some calculators which don't include the HP Solver.

Apple Numbers and Microsoft Excel versions of Bisection, Secant and Newton-Raphson solvers are included in the download.

## Stat5P - linear, logarithmic, power and exponential curve fitting - J E Patterson

Stat5P - Curve fitting with linear, logarithmic, power and exponential equations - Documentation

This program provides linear, logarithmic, power and exponential regressions with a single entry of a data set. I have replaced R/S statements at lines 142,145,154 and 157 with PSE statements. This makes the program easier to use. I have also revised the documentation.

• y ENTER x GSB A. Repeat to enter more data.
• GSB B for linear regression y = ax+b, b is shown, then a and finally r. Enter x' R/S for estimate y'.
• GSB C for logarithmic regression y = a ln(x) + b, b is shown, then a and finally r. Enter x' R/S for estimate y'.
• GSB D for power regression y = xa * b, b is shown, then a and finally r. Enter x' R/S for estimate y'.
• GSB E for exponential regression y = eax * b, b is shown, then a and finally r. Enter x' R/S for estimate y'.
• Repeat x' R/S if required.
• GSB B, C, D, and E can be repeated at any time without re-entering data.

## StrayLightP - Stray light curve correction - J E Patterson

StrayLightP - Stray light curve correction - Documentation

Spectrophotometers have some stray light or detector dark current which causes the calibration to be non linear at high absorbances. This program corrects for the calibration curvature caused by the presence of stray light.

## ToolkitP - TVM, Equation solving and Curve fitting - J E Patterson

ToolkitP - Documentation

This Toolkit is intended to help a little with the use of laboratory equipment and processing the data produced. If income is earned the Toolkit can help with that too.

There are 5 programs:

• TVM - Accurate Time Value of Money.
• NewtonP - Newton-Raphson equation solver.
• CurveP - Fit data that may be linear at low x,y amplitudes but y falls off at higher x values.
• Stat4P - Linear, logarithmic, power and exponential regressions with a single entry of a data set.
• StrayLightP - Stray light curve correction in spectrophotometry. Email: replace at with @
jepattersonatactrix.co.nz

### Programs

The following material is intended for use with computers rather than phones or tablets. The HP-15c Simulator at this stage only runs on a computer running Windows, Linux or macOS.

Clicking on any of the following links will cause a ZIP file to be downloaded. The extracted folder contains HP-15c program files, as well as documentation.

Use the HP-15c Simulator to open the program file, which can also be transferred to a SwissMicros DM15 calculator.

Bike1 - 4 Programs

BisecnewtP - Solver for HP programmable calculators

BisectionP - Solver for HP programmable calculators

Composite - 12 programs

CurveP - Curve Fitting

DiophantineP - Pseudo Diophantine equation - sum of 3 cubes

HP-15c Program Examples - 14 Programs

HP-15c Owner's Handbook - 14 Programs

HP-15c Advanced Functions Handbook - 7 Programs

HP-15c Matrix test routines - 2 Programs

HP-15c Owner's Handbook Matrix examples - 9 Programs

Maths1 - 8 Programs

Maths2 - 12 Programs

HgCalP - Calibrate Mercury Analyser

NewtonP - Newton Raphson Solver

Physics1 - 8 Programs

ReactanceP.15c - Reactance calculations, including inductor turns

SecantP - Solver for HP programmable calculators

Stat5P.15c - linear, logarithmic, power and exponential curve fitting

StraylightP - Stray light curve correction

ToolkitP - TVM, equation solving and curve fitting