(32S) Some Algorithms for RPN Calculators
|
10-03-2022, 12:04 AM
Post: #1
|
|||
|
|||
(32S) Some Algorithms for RPN Calculators
Four programs ported to the HP 32SII calculator from algorithms designated for the 1973 HP 45 calculator.
HP 32SII: Euclid Algorithm - Greatest Common Divisor (GCD) The HP 45 algorithm is found on page 228 in the Algorithms For RPN Calculators book. (see source below) This algorithm takes up three labels. Code: E01 LBL E Sizes and Checksums: E: 10.5 bytes, 9D4D K: 19.5 bytes, F8AD L: 6.0 bytes, C304 Total: 36.0 bytes Instructions: Press [ XEQ ] E, enter M and N. Examples: Input: M = 36, N = 28. Result: 4 Input: M = 48, N = 126. Result: 6 Input: M = 115, N = 300. Result: 5 HP 32SII: Tetens Equation The HP 45 algorithm is found on page 290 in the Algorithms For RPN Calculators book. The original algorithm took the temperature in Celsius. Find the saturation of water vapor (e_m) in mmHg (millimeters of Mercury) given the temperature in °F. Determined Formulas: T (in °C) = (T°F - 32) * 5/9 α = T/(236.87 + T) e_m = 4.579 * 10^(7.49 * α) Code: T01 LBL T 45.0 bytes, 404A Examples: T = 68 °F, Result: 17.53658 mmHg T = 99 °F, Result: 47.63501 mmHg HP 32SII: Dew Point Given Relative Humidity and Air Temperature The HP 45 algorithm is found on page 290 in the Algorithms For RPN Calculators book. The original algorithm took the temperature in Celsius. Relativity humidity (F) is to be entered as a decimal. For instance, instead of 20%, enter 0.20. Determined Formulas: T (in °C) = (T°F - 32) * 5/9 A = T/(T + 236.87) B = 1/(log F/7.49 + A) TD = 236.87/(B - 1) TD = TD * 9/5 + 32 Code: D01 LBL D Size and Checksum: 47.5 bytes, 8677 Examples: T = 80, F = 0.64, Result: 66.725 T = 95, F = 0.32, Result: 60.50684 HP 32SII: Effective Temperature Due to Wind Velocity The HP 45 algorithm is found on page 291 in the Algorithms For RPN Calculators book. The original algorithm took the temperature in Fahrenheit. Wind velocity is in miles per hour (mph). Determined Formulas: A = 0.634*(0.634 - log V) ΔT = A*(T - 90) Effective T = T - ΔT Code: E01 LBL E Size and Checksum: 33.5 bytes, 54F7 Examples: V = 20 mph, T = 15 °F, Result: -16.71728 V = 15 mph, T = 86 °F, Result: 84.62526 Source: Ball, John A. Algorithms For RPN Calculators John Wiley & Sons: New York, NY. 1978. ISBN 0-471-03070-8 |
|||
10-03-2022, 07:46 AM
(This post was last modified: 10-03-2022 08:17 AM by Steve Simpkin.)
Post: #2
|
|||
|
|||
RE: (32S) Some Algorithms for RPN Calculators
Very cool Eddie.
By the way, Algorithms For RPN Calculators by John Ball is available to view (borrow) online at the Internet Archive. https://archive.org/details/algorithmsforrpn0000ball You will need to create a free account to see it. Here is the Table of Contents for reference. [attachment=11194] P.S. I love the handful of the HP-25 program examples in this book! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)