HP15c Program IndexUpdated 19 October 2019ContentsUse the browser "back control" to return here.
IntroductionThe following programs and program compilations have been prepared using Torstan Mantz's HP15c 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 PattersonBike1  4 Programs  DownloadBike1  4 Programs  Documentation
EbikeMax  Ebike maximum speed from motor rpm  J E Patterson
Bike Power  J E Patterson
Bike Development  J E Patterson
Bike Speed  J E Patterson
BisecnewtP  3 Solvers  J E PattersonBisecnewtP  DownloadBisecnewtP  Documentation I have combined the BisectionP, SecantP and NewtonRaphson routines into one program. The three solvers in this program have their own particular strengths. With the additional choice of the builtin solver in the HP15C 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 NewtonRaphson 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 PattersonBisecnewtP2  DownloadBisecnewtP2  Documentation I have combined the BisectionP, SecantP and NewtonRaphson 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 builtin solver in the HP15C 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 NewtonRaphson 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 PattersonBisecnewtP3  DownloadBisecnewtP3  Documentation I have combined the BisectionP, SecantP and NewtonRaphson routines into one program. The builtin SOLVE is also included. The four solvers in this program have their own particular strengths. With the additional choice of the builtin solver in the HP15C 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 NewtonRaphson 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 PattersonBisectionP  DownloadBisectionP  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 NewtonRaphson solvers are included in the download. Composite  12 programs  J E PattersonComposite  12 programs  DownloadComposite  12 programs  Documentation
CurveP  J E Patterson
TVM  Accurate TVM  Jeff Kearns
HgCalP  J E Patterson
RGCalP  J E Patterson
Parallel Resistances  J E Patterson
Quadratic Equation Solver program for the HP15c  from Torsten Manz
Convert to Fraction  Guido Socher
Solve a System of Linear Equations  J E Patterson
EbikeMax  Ebike maximum speed from motor rpm  J E Patterson
Bike Power  J E Patterson
Bike Development  J E Patterson
Function tests  J E Patterson
CurveP  J E PattersonCurveP  Curve Fitting DownloadCurveP  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 PattersonDiophantineP  Pseudo Diophantine equation  sum of 3 cubes zipfile  DownloadDiophantineP  Pseudo Diophantine equation  sum of 3 cubes  Documentation IntroductionPublished 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 HP15c is exceeded so this was calculated using Thomas Okken's Free42 simulator. Another option is to use Wolfram Alpha. For example 75145817515^{3} + (100000000000  38812075974)^{3} + 23297335631^{3} = 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. The sum of cubes is displayed. This program produces the same results as a full summation of cubes for sums less than 1000.
80435758145817515^{3}−80538738812075974^{3}+12602123297335631^{3} = 42
Free42 ProgramI 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 HP15c 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 x^{3} = (a + b)^{3} = a^{3} + 3(a^{2}b + b^{2}a) + b^{3}. 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 HP15c program above for the HP42s, Free42 and the DM15c. I last did number splitting in 1968 on a Sanyo printing calculator with 32 progamming 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. LinksThe 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.
Cracking the problem with 33
HP15c Program Examples  14 Programs  Download HP15c Program Examples  Documentation
Polygon inscribed in circle  J E Patterson
CurveP  J E Patterson
Dumarey equation. Mercury vapour standard concentration ng/ml  J E Patterson
Ebike maximum speed from motor rpm  J E Patterson
Fibonacci Number  J E Patterson
Function tests  J E Patterson
Mercury vapour standard concentration ng/ml  J E Patterson
Little Gauss formula for the HP15c  J E Patterson
Parallel Resistances  J E Patterson
RainGaugeCalP  J E Patterson
HP15c random number simulator  J E Patterson
Random7 Repeat RAN# n times  J E Patterson
StrayLightP  Stray light curve correction  J E Patterson
Test many functions  J E Patterson
HP15c Owner's Handbook  14 Programs  Download HP15c Owner's Handbook  Documentation
Calculate time an object takes to fall to the ground
Mother's Kitchen, a canning company
Predict the diminishing radioactivity of a radioisotope
Slope of a secant line
Solve a system of linear equations
Solve a system of linear equations
Solving a system of linear equations
Cabbages and broccoli
Complex Matrix Transformations
Electric circuit analysis
Matrix function tests
Solve Example program for the HP15c
Throwing a ridget
Opentop box form problem
HP15c Advanced Functions Handbook  7 Programs  Download HP15c Advanced Functions Handbook  Documentation
Arctic explorer JeanClaude Coulerre in anticipation of the sun's reappearance
Design of a vertical broadcasting tower
Discounted cash flow analysis
Special functions for any argument x
Using Complex Mode
Calculating the nth Roots of a Complex Number
Solving an Equation for Its Complex Roots
HP15c Matrix test routines  2 Programs  Download HP15c Matrix test routines  Documentation
Matrix Example test 0  Function test  J E Patterson
Matrix Example test 0b  Function test  J E Patterson
HP15c Owner's Handbook Matrix examples  9 Programs  Download HP15c Owner's Handbook Matrix examples  Documentation
Solving a system of linear equations
Complex matrix in Z^{c} form converted to Z^{p} partitioned form
Electric circuit calculation
Make an identity matrix
Matrix Example test 5, Function test
Matrix Example test 5b, Function test
Cabbages and broccoli
Simple matrix divide test
Matrix division
Maths1  8 ProgramsMaths1  8 Programs  DownloadMaths1  8 Programs  Documentation
CurveP  J E Patterson
Prime Factorization  Eddie Shore
Little Gauss formula for the HP15c  J E Patterson
TVM  Accurate TVM  Jeff Kearns
Quadratic Equation Solver program for the HP15c  from Torsten Manz
Convert to Fraction  Guido Socher
Solve a System of Linear Equations  J E Patterson
Nthdegree Polynomial Fitting  Valentín Albillo
Maths2  12 ProgramsMaths2  12 Programs  DownloadMaths2  12 Programs  Documentation
Gaussian Integration  Valentín Albillo
Decimal to Fraction  Joseph Horn
Base Conversion  Thomas Klemm
Prime Factorization  Eddie Shore
Numerical Derivative  Eddie Shore
Modulo  Gamo
Big Factorial program for the HP15c  Torsten Manz
2D Coordinate Rotation  Eddie Shore
Stair Calculation  Eddie Shore
Triangle Solution provided 2 sides and 1 angle  Gamo
RNEAR  Round to nearest 1/n  Eddie Shore, Dieter. Modified for HP15c  J E Patterson.
Hyperfocal Distance  Gamo, Dieter.
Mercury vapour standard concentration ng/ml  J E PattersonHgCalP  Calibrate Mercury Analyser  DownloadHgCalP  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  NewtonRaphson Solver  J E PattersonNewtonP  NewtonRaphson Solver  DownloadNewtonP  NewtonRaphson Solver  Documentation GSB A runs a NewtonRaphson 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 NewtonRaphson solvers are included in the download. Physics1  8 Programs  Dr. D G SimpsonPhysics1  8 Programs  DownloadPhysics1  8 Programs  Documentation
1. Projectile Problem  Dr. D G Simpson
2. Kepler’s Equation  Dr. D G Simpson
3. Hyperbolic Kepler’s Equation  Dr. D G Simpson
4. Barker’s Equation  Dr. D G Simpson
5. Reduction of an Angle  Dr. D G Simpson
6. Helmert’s Equation  Dr. D G Simpson
7. Pendulum Period  Dr. D G Simpson
8. 1D Perfectly Elastic Collisions  Dr. D G Simpson
ReactanceP  Reactance calculations, inductor turns  J E PattersonReactanceP  Reactance calculations zipfile  DownloadReactanceP  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.
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 PattersonSecantP  DownloadSecantP  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 NewtonRaphson solvers are included in the download. Stat4P  linear, logarithmic, power and exponential curve fitting  J E PattersonStat4P  Statistical curve fitting  DownloadStat4P  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.
StrayLightP  Stray light curve correction  J E PattersonStrayLightP  Curve Fitting  DownloadStrayLightP  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 PattersonToolkitP  DownloadToolkitP  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:

Links
SwissMicros DM15 Scientific Calculator ProgramsThe following material is intended for use with computers rather than phones or tablets. The HP15c 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 HP15c program files, as well as documentation. Use the HP15c Simulator to open the program file, which can also be transferred to a SwissMicros DM15 calculator. Bike1  4 ProgramsBisecnewtP  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 HP15c Program Examples  14 Programs HP15c Owner's Handbook  14 Programs HP15c Advanced Functions Handbook  7 Programs HP15c Matrix test routines  2 Programs HP15c 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 Stat4P.15c  linear, logarithmic, power and exponential curve fitting StraylightP  Stray light curve correction ToolkitP  TVM, equation solving and curve fitting 