Saturday, July 4, 2026

Swiss Micros DM32: Estimating Earth’s Acceleration at Latitude

Swiss Micros DM32: Estimating Earth’s Acceleration at Latitude



Introduction



Earth’s gravitational force is usually set a constant of 9.80665 m/s², usually shortened to 9.8 m/s² or 9.81 m/s² in publications such as physics text books. However, in reality gravity on Earth is not constant. There are many ways to calculate (estimate) the gravitational acceleration depending where you are on Earth. Gravity depends on many factors including latitude (degrees North or South) and the elevation. The blog focuses on the effect of latitude on Earth’s gravity.



The is part of the Acceleration Due to Gravity table from the Desk Ref book (see the Source section). The column for m/s² is added.



Degrees Latitude (North or South)

Gravity Acceleration (cm/s²)

Gravity Acceleration (m/s²)

0 (Equator)

978.0327

9.780327

15

978.3786

9.783786

30

979.3249

9.793249

45

980.6199

9.806199

60

981.9178

9.819178

75

982.8698

9.828698

90

983.2186

9.832186

[Glover, Young, pg. 587]



There are many ways to estimate the gravitational acceleration depending where you are on Earth. Gravity depends on many factors including latitude (degrees North or South) and the elevation.



Earth’s gravity tends to be at the strongest at the poles. However, gravity weakens at higher elevations, where we are further away from the center of the planet.





Gravity Estimate – (Univ. of Illinois)



The formula that is presented by The Grainger College of Engineering Physics Van [Univ. of Illinois] is a simple but pretty accurate estimation of gravity:



g = g_45 – 1 / 2 * (g_poles – g_equator) * cos(2 * latitude * π ÷ 180)

where:

g_poles = 9.832 m/s²

g_45 = 9.806 m/s²

g_equator = 9.78 m/s²

lat = latitude, north or south

2 * latitude is converted to radians. (as it is multiplied by π ÷ 180)



Simplifying the equation leads to:

1 / 2 * (g_poles – g_equator) = 1 / 2 * (9.832 – 9.78) = 0.026

2 * latitude * π ÷ 180 = latitude * π ÷ 90 (in radians)



Then:

g = 9.806 – 0.026 * cos(latitude * π ÷ 90)

(in radians)



DM32 Program: Gravity Estimate



Input L as D.MS (degrees/minutes/seconds) format.



E01 LBL E
E02 RAD
E03 INPUT L
E04 →HR
E05 90
E06 ÷
E07 π
E08 ×
E09 COS
E10 0.026
E11 ×
E12 +/-
E13 9.806
E14 +
E15 STO G
E16 RTN



World Geodetic System 84 Ellipsoidal Gravity Formula



The formula is presented by the World Geodetic System (WGS): [Wikipedia]



g = Ge * ((1 + k * sin² L) ÷ √(1 – e² * sin² L))

L: latitude in decimal degrees

with the constants:

Ge = 9.7803253359 m/s²

k = 0.001931852652

e² = 0.0066943799901



Input L as D.MS (degrees/minutes/seconds) format.



DM32: WEG ‘84



G01 LBL G
G02 DEG
G03 INPUT L
G04 →HR
G05 SIN
G06 x²
G07 STO T
G08 0.001931852652
G09 ×
G10 1
G11 +
G12 1
G13 RCL T
G14 0.0066943799901
G15 ×
G16 -
G17 SQRT
G18 ÷
G19 9.7803253359
G20 ×
G21 STO G
G22 RTN



Table of Values



Sources

“Gravity of Earth” Wikipedia. (2026, January 31).

https://en.wikipedia.org/wiki/Gravity_of_Earth Retrieved March 9, 2026.



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.



Glover, Thomas J. and Richard A. Young. Desk Ref. Sequoia Publishing, Inc. Anchorage, AK 4th Edition. 2022 pg. 587


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, June 27, 2026

HP 32SII: Volume of a Square Frustum (Three Approaches in RPN)

HP 32SII: Volume of a Square Frustum (Three Approaches in RPN)







The volume of a square frustum is:


v = height ÷ 3 × (s1^2 + s2^2 + √(s1^2 × s2^2))


which is based off the formula for the volume of general frustum:


v = height ÷ 3 × (base_area_1 + base_area_2 + √(base_area_1 × base_area_2))



Here are three approaches, which were all done with a HP 32SII calculator. The beauty of RPN is on display here. The three programs are labeled A, C, and D.


s1, s2: side of the square base h: height

Stack: Z: s1 Y: s2 X: h



Program A: (24 steps, 36 bytes) 

V = h/3 * (s1^2 + s2^2 + √(s1^2 * s2^2))


LBL A

STO H

R↓

x<>y

ENTER

ENTER

CLx

-

R↓

x<>y

R↓

×

R↓

+

R↑

+

RCL H

×

3

÷

RTN


Program C: (17 steps, 25.5 bytes)

Note: √(s1^2 * s2^2) = s1 * s2

V = h/3 * (s1^2 + s2^2 + (s1 * s2))


LBL C

ENTER

3

÷

R↓

×

LST x

x<>y

R↓

x<>y

+

R↑

+

×

RTN



Program D: (15 steps, 22.5 bytes) 

Note: s1^2 + s2^2 + s1 * s2 = s1^2 + s2^2 + 2 * s1 * s2 – s1 *s2 = (s1 + s2)^2 - s1*s2 

V = h/3 * ((s1 + s2)^2 - s1 * s2)



LBL D

3

÷

R↓

×

LST x

x<>y

R↓

+

R↑

-

×

RTN



Examples



Example 1:

s1: 24

s2: 30

h: 5.8

Result: 4245.6



Example 2:

s1: 2.54

s2: 12.15

h: 10

Result: ≈ 616.4503





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.


Sunday, June 21, 2026

My International Casio Collection (So Far)

 Pictured:


Pic 1:  Casio fx-991CN X (China) 

Pic 2:  Casio fx-570SPX II Iberia (Spain)

Pic 3:  Casio fx-92 Collège (France)






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, June 20, 2026

High Rollers: When Only Even Numbers Remain – Game Strategy

High Rollers: When Only Even Numbers Remain – Game Strategy



Introduction



In the famous game show High Rollers, which aired from 1975-1980, hosted by Alex Trebek and then again from 1987-1988 hosted by Wink Martindale. The main objective of the game is to eliminate numbers 1 through 9 by rolling dice.



On the game show, there are two rounds*. On the main game, two opponents play against each other. The winner goes on to the Big Numbers where the winner tries to clear all the numbers.



* There were variants, but this was prevailing game modes.



For detailed information: https://en.wikipedia.org/wiki/High_Rollers




Just Even Numbers Left: 2, 4, 6, and 8


From this point, only rolls with even sums are valid. The strategy changes depending on what round is being played.


In a two-player game: You either win by either rolling the last number off the board or getting your opponent to roll an unplayable number. As the game goes on, the chance of rolling an unplayable number increase.


In the Big Numbers bonus round: To win the big prize, typically a $ 10,000 cash jackpot, the only you win is to clear all the numbers.


Ways to roll even numbers:


2: 1,1

4: 1,3; 2,2; 3,1

6: 1,5; 2,4; 3,3; 4,2; 5,1

8: 2,6; 3,5; 4,4; 5,3; 6,2

10: 4,6; 5,5; 6,4

12: 6,6


If both dice has the same number, i.e. 2,2, it is considered a double and it wins the player an Insurance card, which counts as a free roll. At worst, rolling doubles acts as a “roll again”.


With a board consisting of the even numbers 2, 4, 6, and 8, the best way


Roll

Main Game: Against an Opponent

During the Big Numbers Bonus Round

2

Only one move: remove the 2

Only one move: remove the 2

4

Only one move: remove the 4. 4 becomes an unplayable roll.

Only one move: remove the 4. 4 becomes an unplayable roll.

6

Remove the 2 and 4. This eliminates 2, 4, 10, and 12 as valid rolls, leaving only the 6 and 8.

Remove the 6. This leaves 2, 4, and 8. All even rolls are still good. A roll of 6 can eliminate the 2 and 4 the next roll.

8

Remove the 2 and 6. This eliminates the 2, 6, and 10, leaving only the 4, 8, and 12 (12 wins the game).

Remove the 8. This leaves 2, 4, and 6. All even rolls are still good. A roll of 8 can eliminate the 2 and 6 the next roll.

10

Remove the 4 and 6. This leaves 2, 8, and 10 as valid rolls on the next turn (10 wins the game). The chance of rolling a 2, 8, or 10 is 1/6 (≈ 16.7%).

Remove 2 and 8. This leaves 4, 6, and 10 as valid rolls on the next turn (10 wins the game). The chance of rolling a 4, 6, or 10 is 2/9 (≈ 22.2%).

12

Remove on 2, 4, and 6. This leaves only the 8. Chance of rolling 8 is 5/36 (≈ 13.9%).

Remove the 4 and 8. This leaves the 2 and 6. A roll of 8 can eliminate both the 2 and 6 on the next roll. The chance of rolling a 2, 6, and 8 is 11/36 (≈ 30.6%).


Source

“High Rollers” Wikipedia. Edited November 10, 2025. Retrieved February 14, 2026. https://en.wikipedia.org/wiki/High_Rollers


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, June 13, 2026

Numworks (Python): Parallelograms Described by Vectors

Numworks (Python): Parallelograms Described by Vectors



Introduction



The script drawpgram.py draws a parallelogram constructed by a pair of two-dimensional vectors. Both vectors original from the origin of the Cartesian plane ([0, 0]). Let the two vectors be labeled as [x1, y1] and [x2, y2].



This script also calculates the area and perimeter of the constructed parallelogram consisting of the end points (0,0), (x1, y1), (x2, y2), and (x1+x2, y1+y2).







Then the perimeter of the parallelogram is calculated as:

perimeter = 2 * (norm([x1, y1] + norm[x2, y2]) = 2 * (√(x1 + y1) * √(x2, y2))



And the area is calculated as:

area = abs(det([[x1, y1] [x2, y2]])) = abs(x1 * y2 – x2 * y1)





Numworks Script: drawpgram.py

Modules used: Math, PyPlot



Script page: https://my.numworks.com/python/ews31415/drawpgram



# Draw a parallelogram with two vectors

# Edward Shore, 2/15/2026

# Numworks

# drawpgram.py



from math import *

from matplotlib.pyplot import *



print("Draw a parallelogram with 2 vectors")

x1=eval(input("x1? "))

y1=eval(input("y1? "))

x2=eval(input("x2? "))

y2=eval(input("y2? "))



# Area

area=abs(x1*y2-x2*y1)



# Perimeter

perim=2*((x1**2+y1**2)**(1/2)+(x2**2+y2**2)**(1/2))





minx=min([x1,x2,x1+x2,0])

maxx=max([x1,x2,x1+x2,0])

miny=min([y1,y2,y1+y2,0])

maxy=max([y1,y2,y1+y2,0])



axis((minx-1,maxx+1,miny-1,maxy+5))



plot([0,x1],[0,y1],'blue')

plot([0,x2],[0,y2],'purple')

plot([x1,x1+x2],[y1,y1+y2],'purple')

plot([x2,x1+x2],[y2,y1+y2],'blue')



str1="area = {0:.6f}".format(area)

text(minx-1,maxy+4.5,str1)



str2="perim = {0:.6f}".format(perim)

text((minx+maxx)/2,maxy+4.5,str2)



show()



Notes:

1. I use eval(input( “prompt” )) and importing the Math module to allow for expressions to be entered, such as expressions involving pi (π). If I use float(input( “prompt” )) instead, only numbers would be allowed.

2. For the purposes of display, the results are rounded off to six decimal places ({0:.6f}) and displayed in a line. The full precision results of area and perimeter are stored in the variables area and perim, respectively.



Examples



Example 1: [2, 4], [5, 2]



Example 2: [-3, 1], [5, 3]



Example 3: [-6, 0], [0, -4]



Source

Margalit, Dan and Joseph Rabinoff. 2025. “Determinants and Volumes” Interactive Linear Algebra LibreTexts. Accessed February 8, 2026. https://math.libretexts.org/Bookshelves/Linear_Algebra/Interactive_Linear_Algebra_(Margalit_and_Rabinoff)/04%3A_Determinants/4.03%3A_Determinants_and_Volumes



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, June 6, 2026

RPN: Solving T * w + Z = Y * w + X (featuring DM42, HP 67)

RPN:   Solving T * w + Z = Y * w + X  (featuring DM42, HP 67)


Introduction and Code



This is inspired in part by the new Casio fx-92 being released where it has added the linear equation:

ax + b = cx + d



( https://tiplanet.org/forum/viewtopic.php?p=280173&sid=2174c3a99692ac8898ff3957db84031a#p280173 (in French), retrieved February 6, 2026)



Solve the equation for w:

T * w + Z = Y * w + X


where the solution is w = (Z – X) ÷ (Y – T)


The values for T, Z, Y, and X are taken directly from the four-level classic RPN stack.



HP 42S/DM42/HP 41C (programmed with a DM42) Code


LBL “TZYX1”

x<>y

R↓

-

R↓

-

R↑

x<>y

÷

RTN



HP 67 Code


001: LBL A; 31, 25, 11

002: x<>y; 35, 52

003: R↓; 35, 53

004: -; 51

005: R↓; 35, 53

006: -; 51

007: R↑; 35, 54

008: x<>y; 35, 52

009: ÷; 81

010: RTN; 35, 52



Stack Results:


Start

Finish

T

Z - X

Z

Z - X

Y

Y

X

(Z – X) ÷ (Y – T) = W (solution)



Examples


Example 1: 5 * w + 20 = 10 * w + 30


T: 5

Z: 20

Y: 10

X: 30


Solution: w = -2




Example 2: 3 * w – 18 = -2 * w + 16


T: 3

Z: -18

Y: -2

X: 16


Solution: w = 6.8




Example 3: 5 * w + 3 = w + 2


T: 5

Z: 3

Y: 1

X: 2


Solution: w = -0.25




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, May 30, 2026

Numworks (Python): Determining Earth’s Acceleration of Gravity

Numworks (Python): Determining Earth’s Acceleration of Gravity



Introduction



Note: We will only be using SI units on this blog entry and program.



In general, the Earth’s acceleration constant, labeled with a lower case g, is conventionally defined to be 9.80665 m/s². Did you know that the gravitation acceleration on this planet actually varies (albeit slightly) depending on factors? For example, the gravity’s acceleration in Los Angeles, California, is about 9.796 m/s² (see Wikipedia article in the Source section).



On today’s blog, we will estimate the gravity of Earth based with two parameters: the latitude (North/South position on Earth’s grid) and elevation (in meters). This will give us a more accurate estimated on gravity, which in turn will give other physics calculations more accuracy.



For this program, I’m using a mix of formulas to estimate Earth’s gravitational acceleration:



Let Φ = latitude in radian measure:

Φ = (degrees + minutes ÷ 60 + seconds ÷ 3600) * π ÷ 180



For this calculation, consider the absolute value of the latitude. Gravity acceleration is the a given the northern latitude north and the corresponding southern latitude. (Example: gravity is about 9.79325 m/s² at 30° north and 30° south).



Gravity at the surface (0 m) is calculated as:

gs = (a * ga * (cos Φ)^2 + b * gb * (sin Φ)^2) ÷ √((a * cos(Φ))^2 + (b * sin(Φ))^2)

[Bilsin]



Where:

Φ = latitude in radians (see formula above)

a = 6378137 m (Earth’s radius at the equator)

ga = 9.70803253359 m/s² (gravity at the equator)

b = 6356752.3142 m (Earth’s radius at the poles)

gb = 9.8321849378 m/s² (gravity at the poles)

[Bilsin, Table 2]



Gravity at the selected elevation is estimated at:

ge = (100 * gs – 0.3086 * h ÷ 1000) ÷ 100

[Glover]



Where:

h = height in meters (m)



Note: The table on the Desk Ref list gravity as cm/s² and the original formula called for the height in kilometers (km).



To convert feet to meters, multiply by 0.3048.



Numworks Program: earthg.py


https://my.numworks.com/python/ews31415/earthg


Code:


from math import *

# Numworks, EWS, January 2026


# constants

# equator: radius, gravity

a=6378137

ga=9.7803253359

# poles: radius, gravity

b=6356721.3142

gb=9.8321849378


print("Latitude:","\nNorth or South")

d=eval(input("Decimal? "))

m=eval(input("Minutes? "))

s=eval(input("Seconds? "))

phi=radians(d+m/60+s/3600)


print("Height (m)?")

h=eval(input("? "))


gs=a*ga*cos(phi)**2+b*gb*sin(phi)**2

gs/=sqrt((a*cos(phi))**2+(b*sin(phi))**2)


print("Gravity on the surface:")

print(str(gs)," m/s**2")


print("At altitude: ",str(h)," m")

ge=(100*gs-0.3086*h/1000)/100

print(str(ge)," m/s**2")




Examples


Latitude

Elevation

g_surface

g_elevation

30°0’0”

0

9.793247191840559

9.793247191840559

40°0’0”

304.8

9.801696762579571

9.800756149779572

45°0’0”

762

9.806197665936962

9.803846133936961

12°5’13”

1219.2

9.782589588493437

9.778827137293437

34°26’44”

500

9.796866770553882

9.795323770553882


g_surface: gravity at surface level (0 m)

g_elevation: gravity at the selected elevation



Sources


Bislin, Walter. “Earth Gravity Calculator” September 1, 2018. https://walter.bislins.ch/bloge/index.asp?page=Earth+Gravity+Calculator Retrieved January 15, 2026.


Glover, Thomas J. and Richard A. Young Desk Ref Sequoia Publishing, Inc. Anchorage, AK. 4th Edition, 2022. Soft Cover ISBN 978-1-885071-60-6. pg. 587


“Gravity of Earth” Wikipedia. Last edited January 31, 2026. https://en.wikipedia.org/wiki/Gravity_of_Earth Retrieved February 1, 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.