Saturday, October 17, 2026

HP 67 Collection: October 2026

HP 67 Collection: October 2026


All examples are done in FIX 4. (DSP 4)



Earth's Gravity at a Specific Latitude



The true earth gravity force depends on several factors, such as latitude and altitude. This estimation takes the latitude (north/south), in degrees-minutes-seconds, and latitude, in kilometers, into account.



The constant 9.80665 m/s^2 is an accepted average, the true force varies.

g_s = 9.806 – 0.026 * cos(2 * φ)

g_h = g_s * (6378.1 / (6378.1 + h))



HP 67 Code:

LBL A: 001 31, 25, 11

DEG: 002 35, 41

H←: 003 31, 74

2 : 004 02

× : 005 71

COS: 006 31, 63

. : 007 83

0 : 008 00

2 : 009 02

6 : 010 06

× : 011 71

9 : 012 09

. : 013 83

8 : 014 08

0 : 015 00

6 : 016 06

x<>y: 017 35, 52

- : 018 51

x<>y: 019 35, 52

6 : 020 06

3 : 021 03

7 : 022 07

8 : 023 08

. : 024 83

1 : 025 01

+ : 026 61

LST x: 027 35, 82

x<>y: 028 35, 52

÷ : 029 81

× : 030 71

RTN : 031 35, 22



Inputs:

Y: h

X: φ



Examples:

Inputs: h = 0, φ = 2°33’: g ≈ 9.7801

Inputs: h = 0.762, φ = 52°17’: g ≈ 9.8114



Source 

Grainger Engineering Office of Marketing and Communications. (answer written by Rebecca H.) (2016, November 21). “How gravitational force varies at different locations on Earth.” Illinois. https://van.physics.illinois.edu/ask/listing/64061. Retrieved March 10, 2026.



Triangulation



With angles α and ß:

base = dist * (1/tan α + 1/tan ß)

dist = base ÷ (1/tan α + 1/tan ß)



Labels:

LBL A: Enter angles α and ß in the current angle mode. Returns 1/tan α + 1/tan ß.

LBL B: Base. When a number is entered prior to pressing [ B ], the number is stored as a base. Otherwise, the program solves for a base.

LBL C: Distance (of a line that bisects the base). When a number is entered prior to pressing [ C ], the number is stored as a base. Otherwise, the program solves for a base.


HP 67 Code:

LBL A: 001 31, 25, 11 (enter the angles)

TAN: 002 31, 64

1/x: 003 35, 62

x<>y: 004 35, 52

TAN: 005 31, 64

1/x: 006 35, 62

+: 007 61

STO 5: 008 33, 05

RTN: 009 35, 22


LBL B: 010 31, 25, 12 (base)

STO 3: 011 33, 03

F? 3: 012 35, 71, 03

RTN: 013 35, 22

RCL 4: 014 34, 04

RCL 5: 015 34, 05

× : 016 71

STO 3: 017 33, 03

RTN: 018 35, 22


LBL C: 019 31, 25, 13 (distance)

STO 4: 020 33, 04

F? 3: 021 35, 71, 03

RTN: 022 35, 22

RCL 3: 023 34, 03

RCL 5: 024 34, 05

÷ : 025 81

STO 4: 026 33, 04

RTN: 027 35, 22


Examples:

α = 30°, ß = 65°

Set degree mode. 30 [ ENTER ] 65 [ A ]. Result: 2.1984

Distance = 24, solve for base. 24 [ C ] [ B ]. Result: 52.7606

Base = 24, solve for distance. 24 [ B ] [ C ]. Result: 10.9172


Source:

“Triangulation (surveying)” Wikipedia. https://en.wikipedia.org/wiki/Triangulation_(surveying) (last edited October 24, 2025). Retried March 17, 2026



Time of Runoff on Turf


t = 2.5 * (L / (S * I^2))^(1/3)


t: time of runoff (rain off) in minutes

2.5: turf constant

L: distance from remote area in feet

S: slope of the terrain

I: rain intensity in inches per hour


Input Stack:

Z: L

Y: S

X: I


Output Stack:

X: t


HP 67 Code:

LBL A: 001 31, 25, 11

x² : 002 32, 54

× : 003 71

÷ : 004 81

3 : 005 03

1/x: 006 35, 62

y^x: 007 35, 63

2 : 008 02

. : 009 83

5 : 010 05

× : 011 71

RTN: 012 35, 22


Examples:

Inputs: Z: 900 ft, Y: 0.11, X: 4 in/hr. Result: 19.9917 min

Inputs: Z: 650 ft, Y: 0.33, X: 0.06 in/hr. Result: 204.4744 min


Source


Texas Instruments. Slide Rule Calculator SR-50A Manual. 1975. Manual from datamath.org: http://www.datamath.net/Manuals/SR-50A_US.pdf pg. 59



Beamwidth of a Radio Telescope


This program calculates the beam width of a radio telescope in degree-minutes-seconds.


Θ = 67625 ÷ (D * f)

Θ = beam width

D = the diameter of a circular telescope in feet

f = observing frequency in MHz (megahertz)


Inputs:

Y: D

X: f

Outputs:

X: Θ


HP 67 Code:

LBL B: 001 31, 25, 12

× : 002 71

1/x : 003 35, 62

6 : 004 06

7 : 005 07

6 : 006 06

2 : 007 02

5 : 008 05

× : 009 71

→H.MS: 10 32, 74

RTN: 11 35, 22


Examples:

Inputs: X: 1980 MHz, Y: 106 ft. Output: Θ: 0.1920 (19’20”)

Inputs: X: 1665 MHz, Y: 84 ft. Output: Θ: 0.2901 (29’01”)


Source


Ball, John A. Algorithms for RPN Calculators John Wiley & Sons: New York, NY. 1978. ISBN 0-471-03078-8. pg. 259



Fan Laws


p2 = (rpm2 ÷ rpm1)^n * p1

(p1 and p2 stand for various parameters, see the input syntax below)


Inputs:

1st law: (cfm: cubic feet per minute, rpm: revolutions per minute)

Calculate cfm2:

T: cfm1

Z: rpm2

Y: rpm1

X: 1


2nd Law: (sp: static pressure, rpm: revolutions per minute)

Calculate sp2:

T: sp1

Z: rpm2

Y: rpm1

X: 2


3rd Law: (hp: horsepower, rpm: revolutions per minute)

Calculate hp2:

T: hp1

Z: rpm2

Y: rpm1

X: 3


HP 67 Code:

LBL B: 001 31, 25, 12

R↓ : 002 35, 53

÷ : 003 81

R↑ : 004 35, 54

y^x: 005 35, 63

× : 006 71

RTN: 007 35, 22


Examples

1st Law: T: cfm1 = 2000, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 1

Result: cfm2 ≈ 2315.7895

2nd Law: T: sp1 = 0.5, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 2

Result: sp2 ≈ 0.6704

3rd Law: T: hp1 = 1.5, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 3

Result: hp2 ≈ 2.3286


Source

Gladstone, John. Air Conditioning Testing and Balancing: A Field Practice Manual A Van Nostrand Reinhhold Book. August 1976. pp. 24-32



More HP 67 goodness to come in November,


Eddie


All original content copyright, © 2011-2026. 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.

Saturday, October 10, 2026

HP 42S/DM42/Free 42: Two Functions Programmed Three Different Ways

HP 42S/DM42/Free 42: Two Functions Programmed Three Different Ways



Introduction



In 1979, Electro Scientific Industries (esi) released the (rare) ESI Calcumeter 4100 which is a combination multimeter and RPN calculator. I’m going to focus on the calculator part.


The calculator is a standard RPN calculator with the following functions: x^2, √, 1/x, 10^x, e^x, LN, log, and y^x. Also present are the standard ↓ROLL (roll down) and x<>y (swap) functions. Then we have other unique function such as:


mx+b: Applies a linear regression model to a measurement, with m stored in memory and b is grabbed from the y-registered


dBV: Decibel measurement (volt): 20 * log(measurement ÷ memory) (measurement is probably in the X register)


%DEV: percent change of a measurement from the value stored in memory:

100 * (measurement – memory) ÷ memory


AVG: average of cumulative amount of measurements against the value stored in memory


xy/(x+y): calculates x * y ÷ (x + y)


xy/(x – y): calculates x * y ÷ (x – y)


Getting this multimeter combo was not inexpensive, it had a retail price of $399 in 1979.


Today’s blog will focus on two of these functions, particularly xy/(x+y) and xy/(x-y).



The Functions xy/(x+y) and xy/(x-y)


As I could gather from the calculator’s keyboard:


xy/(x+y): Multiply Over Plus*

MOP(x,y) = (x * y) ÷ (x + y) = 1/(1/y + 1/x)


xy/(x-y): Multiply Over Subtract*

MOP(x,y) = (x * y) ÷ (x - y) = 1/(1/y – 1/x)


* These are my names for these functions. I don’t have the manual. Here I am assuming that the stack is in the traditional order: X is the display, Y is the stack just above X, and the RPN works like any (HP) RPN calculator.


All programs are made using the Free42 app (42S/41C family).


Stage 1: The Long Way


This starts out by duplicating x and y first until we have the stack as follows: Y, X, Y, X.



00 { 19-Byte Prgm }

01▸LBL "MOP"

02 ENTER

03 ENTER

04 CLX

05 -

06 R↓

07 X<>Y

08 +

09 R↓

10 ×

11 R↑

12 ÷

13 RTN

14 END


00 { 19-Byte Prgm }

01▸LBL "MOS"

02 ENTER

03 ENTER

04 CLX

05 -

06 R↓

07 X<>Y

08 -

09 R↓

10 ×

11 R↑

12 ÷

13 RTN

14 END



Stage 2: What if we assume x and y are nonzero?


Let n = (x * y) ÷ (x ± y)

Then:

1/n = (x ± y) ÷ (x * y)

1/n = x ÷ (x * y) ± y ÷ (x * y)

1/n = 1/y ± 1/x

n = 1/(1/y ± 1/x)



00 { 14-Byte Prgm }

01▸LBL "MOAR"

02 1/X

03 X<>Y

04 1/X

05 +

06 1/X

07 RTN

08 END


00 { 15-Byte Prgm }

01▸LBL "MOSR"

02 X<>Y

03 1/X

04 X<>Y

05 1/X

06 -

07 1/X

08 RTN

09 .END.


Shorter.


Stage 3: Using Stack Storage Operations (41C/42S only)


The HP 41C and 42S families allow us to use stack levels (X, Y, Z, T, and L) as storage registers. Let's see if we can take advantage of this.



00 { 17-Byte Prgm }

01▸LBL "MOP42"

02 STO ST Z

03 X<>Y

04 STO× ST Z

05 +

06 ÷

07 RTN

08 END


00 { 17-Byte Prgm }

01▸LBL "MOS42"

02 STO ST Z

03 X<>Y

04 STO× ST Z

05 -

06 ÷

07 RTN

08 END


Sources


Electro Scientific Industries, Inc. “Calcumeter 4100” Ad/Pamphlet Micrometrics, Inc. Portland, OR. 1979


Sanden, Kees van der. “The ESI Calcumeter 4100” https://www.keesvandersanden.nl/calculators/esi4100.php Retrieved June 19, 2026.





I hope you enjoyed our deep dive. See you next time,


Eddie


All original content copyright, © 2011-2026. 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.

Saturday, October 3, 2026

Casio fx-50F/Radio Shack EC-4024 Program Collection: October 2026

Casio fx-50F/Radio Shack EC-4024 Program Collection: October 2026




Notes:

* The fx-50F/EC-4024 has a 29 step program space between two program spaces. Program steps can not be edited but can be cleared by [SHIFT] [ C ] (PCL) key sequence.

* Formula calls can not be included as a program step, but scientific constants can be. The values for the constants most likely are from the Japan Standards of 1978 (JISZ-8020-1978), so a little dated to 2026 standards.

* The Casio fx-10F is similar as fx-50F/EC-4024 except that the fx-10F does not have the scientific constants and has a slightly inclined keyboard.

* Mode changes can be included. SHIFT and Kin arithmetic calls are merged.



The programs presented today require inputs to be stored in registers 1-6 using [ SHIFT ] [ Kout ] (Kin) ((K)onstants In).



Angle Between 2 Lines (in Degrees)



Θ = arctan( abs((y – x) ÷ (1 + x * y)) )

abs(x) = √(x^2), key sequence: [ x² ] [ √ ]



x: slope of line 1 (Kin 1)

y: slope of line 2 (Kin 2)



Program Code (20 steps):

MODE 4 (degree)

(

(

Kout 2

-

Kout 1

)

÷

(

1

+

Kout 1

×

Kout 2

)

)

x²

√

TAN^-1

=



Maximum and Minimum of Two Numbers



The two numbers are stored in registers 1 and 2 (Kin 1, Kin 2).

max(x,y) = (x + y + abs(x – y)) ÷ 2 = min(x,y) + abs(x – y)

min(x,y) = (x + y - abs(x – y)) ÷ 2 = max(x,y) - abs(x – y)



Program Code (21 steps):

Kout 2

-

Kout 1

=

x²

√

Kin 3

(

Kout 1

+

Kout 2

+

Kout 3

)

÷

2

=

HLT (show maximum)

-

Kout 3

= (show minimum)



Terminal Velocity of a Spherical Object

vt = √(2 * g * mass ÷ (ρ * cd * exposed area of the object) (units: m/s)

≈ √(34.05656 * mass ÷ (π * radius^2))



The following constants are assumed:

g = 9.80665 m/s² (Earth’s gravitational constant)

ρ ≈ 1.225 kg/m³ (air pressure)

cd = 0.47 (coefficient drag of a sphere)

2 * g ÷ (ρ * cd) ≈ 34.06565 m^4/(s^2 kg)



Program Code (19 steps):

Kout 1

×

3

4

.

0

6

5

6

5

÷

(

π

×

Kout 2

x²

)

=

√

=



Ideal Thermal Voltage and Shockley Diode Equation



Thermal Voltage:

vt = k * T ÷ q * 10^3 (mV)

Shockley Diode Equation:

Id = Is * (exp(vD ÷ (n * vt)) – 1)

Ideal: n = 1



Inputs:

Is: scale current in milliamps (mA) Kin 1

Vd: diode voltage in millivolts (vA) Kin 2

T: temperature in degrees Kelvin (K) Kin 3

Outputs:

vt: Thermal Voltage (mA),

Id: diode current (mV)



Constant used (see comments on the scientific constants above):

k: Boltzmann Constant ([SHIFT] [ 8 ]): 1.380662 * 10^-23 J/K

(q) e: Electron Charge ([SHIFT] [ 4 ]): 1.6021892 * 10^-19 C



Program Code (21 steps):

Kout 3

×

k (SHIFT 8)

÷

e (SHIFT 4)

×

3

10^x

=

HLT (see vt: thermal voltage)

1/x

×

Kout 2

=

e^x

-

1

=

×

Kout 1

=



Source:

“Shockley Diode Equation” Wikipedia. Last Edited November 13, 2025.

https://en.wikipedia.org/wiki/Shockley_diode_equation

Retrieved June 19, 2026.




Eddie


All original content copyright, © 2011-2026. 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.


Saturday, September 26, 2026

Python in Numworks: Duplicating and Grayscale

Python in Numworks: Duplicating and Grayscale




All three scripts presented today use the math, random, and the Numworks specific



Stage 1: Generating Boxes of Random Colors



The script generates 15 boxes of random colors of 30 pixels each. This the list of available colors:





red: (255, 0, 0)

orange: (255, 127,0)

lime green: (0, 255, 0)

teal: (0, 128, 128)

blue: (0, 0, 255)

yellow: (255, 255, 0)

dark green: (0, 128, 0)

purple: (128, 0, 128)



The kandinsky command fill_rect draws a filled rectangle and has the following syntax:

fill_rect( x, y, width, height, rbg tuple )

(x,y) is the upper left hand corner of the rectangle in pixels (size 320 x 220).


from math import *

from kandinsky import *

from random import *


'''

draw boxes of random colors


Edward Shore

6/7/2026

'''


# set up eight colors

# red,orange,lime,teal,

# blue,yellow,dark green,purple


colors=[(255,0,0),(255,127,0),(0,255,0),(0,128,128),(0,128,0),(128,0,128)]


# draw 15 squares of random colors

for i in range(3):

  for j in range(5):

    col=choice(colors)

    fill_rect(30+30*i,30+30*j,30,30,col)


(results will vary)



Stage 2: Duplicating the Boxes



This script generates 15 boxes and then copies them to another area. I wanted the script to determine the pixel color’s because in more complex programs, we may not always know the color tuple of a pixel in advance.



The command get_pixel returns a color’s tuple:

get_pixel(x, y) → (red, green, blue)



Although this script does not use the command, Kandinsky also has a set_pixel command which turns a pixel a certain color.

set_pixel(x, y, (red, green, blue))


from math import *

from kandinsky import *

from random import *


'''

draw boxes of random colors

and dupicate them

Edward Shore

6/7/2026

'''


# set up eight colors

# red,orange,lime,teal,

# blue,yellow,dark green,purple


colors=[(255,0,0),(255,127,0),(0,255,0),(0,128,128),(0,128,0),(128,0,128)]


# draw 15 squares of random colors

for i in range(3):

  for j in range(5):

    col=choice(colors)

    fill_rect(30+30*i,30+30*j,30,30,col)

    # get the color

    gcol=get_pixel(30+30*i,30+30*j)

    fill_rect(150+30*i,30+30*j,30,30,gcol)


(results will vary)



Stage 3: Grayscale



The third script converts the duplicated pixel to grayscale using this formula:

grayscale = red * 0.299 + green * 0.587 + blue * 0.114

and the resulting color tuple is (grayscale, grayscale, grayscle)



The weights are selected to accommodate the human eye’s sensitivity to red, green, and blue.


from math import *

from kandinsky import *

from random import *


'''

draw boxes of random colors

and dupicate them in grayscale

Edward Shore

6/7/2026

'''


colors=[(255,0,0),(255,127,0),(0,255,0),(0,128,128),(0,128,0),(128,0,128)]


# draw 15 squares of random colors

for i in range(3):

  for j in range(5):

    col=choice(colors)

    fill_rect(30+30*i,30+30*j,30,30,col)

    # get the color

    w=get_pixel(30+30*i,30+30*j)

    # convert to grayscale

    w=w[0]*0.299+w[1]*0.587+w[2]*0.114

    # create a tuple

    gcol=(w,w,w)

    fill_rect(150+30*i,30+30*j,30,30,gcol)


(results will vary)



Source



“Color Space Conversion & Binarization for Image Processing” Dynamsoft. May 24, 2019. https://www.dynamsoft.com/blog/insights/image-processing/image-processing-101-color-space-conversion/ Retrieved June 6, 2026.



Eddie


All original content copyright, © 2011-2026. 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.

HP 67 Collection: October 2026

HP 67 Collection: Oct ober 2026 All examples are done in FIX 4. (DSP 4) Earth's Gravity at a Specific Latitude The true ea...