For the historical record and in order to preserve my earliest and/or unreleased efforts in the wonderful world of HP programmable calculators and pocket computers, here you'll find a selection of HP programs I wrote for various HP models ranging in capabilities from the HP-25 to the HP-71B.
The HP-25 programs are for the most part (not all) quite simple affairs, written just for practice and never intended for release, as back in 1975 I was learning programming techniques (the HP-25 was my very first programmable calc) and the HP-25 was slow and had very little RAM (49 steps, 8 registers) as well as a very limited programming paradigm (no labels, no subroutines, no flags), so don't expect anything too sophisticated (though there are a few surprises). That said, I think they're still quite enjoyable and fun to check and even convert to run on other devices.
On the other hand, most subsequent HP models (such as the HP-11C, HP-67, HP-34C, HP-41C, etc., let alone the HP-71B !) had much more RAM for both programs and data and also advanced programming capabilities, so the programs I wrote for them take full advantage of that and are significantly more complex and capable, no longer "practice" ones. Some of them were published in the past in physical media (paper magazines, solution books, CD/DVD/USB pendrives), which would-be readers (even the authors themselves) had to pay for, but now for the first time they'll be available to download for free, as will existing but still unpublished programs or even new programs I might write now and in the foreseeable future. Stay tuned !
3-page paper featuring a 37-step RPN program for the HP-25 to numerically solve 2nd-order differential equations of the form y”=f(x,y) subject to initial conditions, using the 5th-order predictor-corrector Numerov’s method. One worked example included.
2-page paper featuring a 49-step RPN program for the HP-25 to accurately evaluate the Gamma function in the interval [1, 2], as well as approximate factorials for real-valued x. Three worked examples included.
2-page paper featuring a 70-step RPN program for the HP-34C to generate either a complete amortization schedule showing each period of a fully amortized loan or a partial schedule between two given periods. One worked example is included.
3-page paper featuring an 84-step RPN program for the HP-34C to quickly and accurately find the sum of infinite alternating series, even divergent ones (Euler sum). Three worked examples are included.
3-page paper featuring a 67-step RPN program for the HP-34C to compute the numeric value of a definite double integral of a user-specified f(x,y) between given limits. Four worked examples are included.
4-page paper featuring a 175-step RPN program for the HP-34C, HP-67 and HP-97 programmable calculators to compute simultaneously and non-iteratively all four real and/or complex roots of a general 4th-degree (or less) polynomial equation with real coefficients, using exact formulas. The HP-34C's SOLVE function is not used and all four real and/or complex roots are computed at once in 15-20 seconds at most.
It will also work in the HP-15C, the HP-41C series and posibly other RPN models with very minimal changes (detailed in the Notes). Four worked examples are included, solving three quartics and one cubic equation.
4-page paper featuring a 102-step RPN program for the HP-34C programmable calculator to solve a system of two arbitrary nonlinear equations in two variables. Will also work as-is in the HP-67/97 and in the HP-15C and HP-41C series with minimal changes. Two worked examples are included.
3-page paper featuring a 127-step program for the HP-34C programmable calculator to factorize an integer into its prime factors, compute the greatest common divisor (GCD) of two integers, and find integer fractions which best approximate a given real value. It will also work in the HP-41C series with trivial changes. Three worked examples are included.
3-page paper featuring an 86-step RPN program for the HP-34C to challenge your memory by testing your ability to remember what you’ve just seen and offering afterwards an accurate comment on your performance.
4-page paper featuring a 42-step RPN program for the HP-41C to find real roots of an arbitrary user-supplied equation f(x)=0 using Newton’s method and a user-given initial guess. Interactive and non-interactive versions provided. Five worked examples included.
3-page paper featuring a 28-step RPN program for the HP-41C to find extrema (maxima and/or minima) of an arbitrary user-supplied function y=f(x) by calling program RF (Root Finder) internally as part of the computation. Two worked examples are included.
3-page paper featuring a 55-step RPN program for the HP-41C to evaluate the definite integral between given limits of an arbitrary user-supplied function f(x) using the fast 3-point Gauss-Legendre quadrature formula applied over a number of subintervals. Three worked examples included.
3-page paper featuring a 90/62-step RPN program for the HP-41C programmable calculator series to simulate randomly throwing two dice, which are printed graphically followed by their sum.
It includes a subroutine which can be globally called from other programs or from the keyboard to accumulate in the printer buffer the graphics for any single die face. Both Standard and Synthetic Programming versions are included.
7-page paper featuring a 137-step program for the HP-41C programmable calculator to obtain quickly and accurately an approximate numerical solution for a system of N simultaneous first-order differential equations or, conversely, a single differential equation of the Nth-order, using a fourth-order Runge-Kutta method. It will also run in the HP-41CV, HP-41CX and the HP42S. Two worked examples included.
7-page, 13-diagram paper featuring a 285-step program for the HP-41C programmable calculator (will also run as-is in the HP-41CV or the HP-41CX and with trivial changes in the HP42S as well as in compatible devices or emulators). The program is intended to help the user practice in order to achieve the difficult basic checkmate of King, Bishop and Knight (controlled by the user) vs. King alone (controlled by the program) within a specified number of moves. The user must try and checkmate before the allotted moves elapse while the program does its best to avoid being checkmated.
Two worked examples included, one of them against the world-class chess engine Stockfish 9 (released in 2018 and rated at more than 3,300 ELO), the other against a human user.
4-page paper featuring a 129-step RPN program for the HP-41C programmable calculator (will also run as-is in the HP-41CV/CX and in the HP42S with trivial changes) to obtain a numerical solution for a system of N algebraic linear equations in N unknowns using the iterative method of Gauss-Seidel, a relaxation/overrelaxation method.
A system of up to 15 equations can be solved if using all 4 memory modules (HP-41C) and the input matrix is left unchanged by the procedure so it can be reused for further processing. Also, full details are given to modify it to use synthetic instructions to save registers, if desired. Two worked examples included.
3-page paper featuring a 142-step fun game RPN program for the HP-41C to challenge your memory by testing your ability to remember what you’ve just seen and offering afterwards an accurate comment on your performance.
2-page paper featuring an 85-step fun RPN program for the HP-41C to test your “ESP” (Extra-Sensorial Powers) by conducting a series of 10 tests, after which it reports the % of success and an evaluation of your alleged extrasensorial abilities (if any). One sample run included.
5-page paper featuring a 215-step RPN program for the HP-41C programmable calculator (will also run as-is in the HP-41CV/CX and in the HP42S with trivial changes) to find all eigenvalues of a real symmetric NxN matrix using the iterative method of Jacobi, which is fast and always converges.
Matrices up to 22x22 can be treated and full details are given about the algorithm and on how to modify the program to use synthetic instructions to save registers, if desired. One worked example and two test cases with solutions included.
4-page paper featuring a 170-step RPN program I wrote in 1980 for the HP-41C programmable calculator (will also run as-is in the HP-41CV/CX) to compute the inverse of a real NxN matrix (no Advantage module back then), where N ranges from 1 up to 16, using a non-gaussian interchange method.
The program is written so that zero pivots will cause no trouble, they’re skipped and the following pivot is tested. The locations of all zero pivots are remembered and their corresponding interchanges are performed later.
These articles, programs, pictures, their descriptions and other materials created by me are (c) Valentin Albillo, and can be used freely for non-profit purposes as long as (1) the contents aren't modified in any way and (2) the copyright is acknowledged.
In plain words, you can download them and use them for non-profit purposes but do not include them in any media and/or site for which you're asking money, do not tamper with their contents and do not say or imply that you created them or that you don't know who created them, you must always give due credit to the copyright holder (that's me).