Sunday, January 26, 2020

HP 42S & Casio fx-260 Solar: Continued Fractions

HP 42S & Casio fx-260 Solar: Continued Fractions

Introduction

Let x be a real number.  Then x can be represented by the fraction:

x = n_1 + 1/(n_2 + 1/(n_3 + 1/(n_4 + 1/(n_5 + ...))))

The above form is known as a continuous fraction, which can either have a finite set of terms or infinite set of terms.   In short form, continuous fractions can be written in a vector form:

x = [ n_1, n_2, n_3, n_4, n_5, ... ]

If you are given a continuous fraction (n_1, n_2, etc.), you can calculate x with the following keystrokes, starting with the last term n_k and working left to n_1:

RPN Calculators

1.  Start by entering n_k, then press [ 1/x ]
2.  Loop:  For each n_m for 1 < m < k:  enter n_m, [ + ], [ 1/x ]
3.  For n_1:  Enter n_1, [ + ]

Remember, we are working leftwards. 

Example:

Calculate 2 + 1/( 3 + 1/(5 + 1/2)).   In other words x = [2, 3, 5, 2]

2 [ 1/x ]
5 [ + ] [ 1/x ]
3 [ + ] [ 1/x ]
2 [ + ]

Result:  81/35 ≈ 2.31429

The program CF for the HP 42S (and Swiss Micros DM42 and Free42 emulator) calculates the value of a continued fraction.  Instructions:

1.  Run CF ( [ XEQ ] (CF) )
2.  Enter n_k, press (LAST)
3.  For each n_m for 1 < m < k, enter n_m, press (MID)
4.  For n_1, enter n_1, press (1ST).  You get the result.

HP 42S/DM42/Free 42 Program CF

00 {56-Byte Prgm}
01 LBL "CF"
02 LBL 04
03 CLMENU
04 "LAST"
05 KEY 1 GTO 01
06 "MID"
07 KEY 2 GTO 02
08 "1ST"
09 KEY 3 GTO 03
10 MENU
11 LBL 00
12 STOP
13 GTO 00
14 LBL 01
15 1/X
16 GTO 04
17 LBL 02
18 +
19 1/X
20 GTO 04
21 LBL 03
22 + 
23 CLMENU
24 EXITALL
25 RTN
26 END

Classic Algebraic (AOS) Calculators

We can use the same strategy for classic algebraic calculators such as the Casio fx-260 Solar II and TI-30Xa Solar:

1.  Start by entering n_k, then press [ 1/x ]
2.  Loop:  For each n_m for 1 < m < k: press [ + ], enter n_m, press [ = ], [ 1/x ]
3.  For n_1:  Enter n_1, [ + ]

Remember, we are working leftwards. 

Calculate 2 + 1/( 3 + 1/(5 + 1/2)).   In other words x = [2, 3, 5, 2]

2 [ 1/x ]
[ + ] 5 [ = ] [ 1/x ]
[ + ] 3 [ = ] [ 1/x ]
[ + ] 2 [ = ]

Result:  81/35 ≈ 2.31429


Eddie

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

TI 84 Plus CE: Testing Limits of the Arcsine Function

TI 84 Plus CE: Testing Limits of the Arcsine Function

Approximating the Arcsine

The approximation of the arcsine function is a difficult task.  In the task of approximating functions, sometimes it is helpful to determine bounds for approximation.  For example, the bounds determined by the Shafer-Fink double inequality:

For any x between 0 and 1:

3*x/(2 + √(1 - x)^2) ≤ arcsine x ≤ π*x/(2 + √(1 - x)^2)

Let L = 3*x/(2 + √(1 - x)^2)

Then π/3 * L = π*x/(2 + √(1 - x)^2)   (the upper limit)

TI-84 Plus CE Program SHAFFINK

"EWS 2020-01-05"
ClrHome
Disp "SHAFER-FINK","INEQUALITY","TI-84+ CE","0≤X≤1"
Radian
Prompt X
(3X)/(2+√(1-X²))→L
Lπ/3→U
(L+U)/2→V
sin^-1(X)→A
ClrHome
Disp "X : "+toString(X)
Disp "RESULTS SHAFER-FINK"
Disp "LOW: "+toString(L)
Disp "HIGH:"+toString(U)
Disp "AVG: "+toString(V)
Disp "ASIN:"+toString(A)

The program SHFFINK calculates the lower and upper bound, the average between the two, and for comparison, the actual arcsine of x.  Below are screen shots for x from x = 0 to x = 1, increments of 0.1.  At x = 0, the lower bound is more accurate, but as x approaches 1, the upper bound becomes more accurate. 



A Revised Upper Limit:  Gabriel Bercu

In his research article, Gabriel Bercu, Ph.D of the University of Galati (see Source below), proved that the upper limit can be improved.  The results:

( I )
arcsine x ≤ π*x/(2 + √(1 - x)^2) + (1 - π/3) * x
0 ≤ x ≤ 0.871433

( II )
arcsine x ≤ π*x/(2 + √(1 - x)^2) + (π - 4)*√(1 - x)/(2*√2) + π*(1 - x)/4
0.85068 ≤ x ≤ 1

The program BERCU is similar to SHAFFINK.  For clarity purposes, the program switches from (I) to (II) when x reaches .85068.

TI-84 Plus CE Program BERCU

"EWS 2020-01-05"
ClrHome
Disp "BERCU INEQUALITY","TI-84+ CE","0≤X≤1"
Radian
Prompt X
(3X)/(2+√(1-X²))→L
If X<.85068
Then
Lπ/3+(1-π/3)X→U
Else
Lπ/3+(π-4)√(1-X)/(2√(2))+π(1-X)/4→U
End
(L+U)/2→V
sin^-1(X)→A
ClrHome
Disp "X : "+toString(X)
Disp "RESULTS BERCU"
Disp "LOW: "+toString(L)
Disp "HIGH:"+toString(U)
Disp "AVG: "+toString(V)
Disp "ASIN:"+toString(A)

The program BERCU calculates the lower and upper bound, the average between the two, and for comparison, the actual arcsine of x.  Below are screen shots for x from x = 0 to x = 1, increments of 0.1.  At x = 0, the lower bound is more accurate, but as x approaches 1, the upper bound becomes more accurate. 



Source:

Bercu, Gabriel. (2017). Sharp Refinements for the Inverse Sine Function Related to Shafer-Fink’s Inequality. Mathematical Problems in Engineering. 2017. 1-5. 10.1155/2017/9237932. https://doi.org/10.1155/2017/9237932

Eddie


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

Friday, January 24, 2020

HP Prime: Firmware Update

HP Prime:  Firmware Update

Here's the latest firmware update for the HP Prime.  This version fixes bugs, makes the commands ROUND and TRUNC work with numbers with units, updates the CAS system to 1.5, and allows adjustments for screen refresh rate. 

There are two versions for download.  Which version to download depends on the hardware of the HP Prime you have. 

You have the G2 version if your calculator has the G2 symbol on the back of the calculator.  You can also press [Help], scroll up to About HP Prime.  If your hardware version is D, your HP Prime has Hardware G2.  If neither of the previous statements is the case, then download the Hardware G1 version. 

It's very important that you download the correct version to your calculator!

Hardware G1 - 2.1.14425 dated 1/16/2020:

https://www.hpcalc.org/details/7469


Hardware G2 - 2.1.14433 dated 1/21/2020:

https://www.hpcalc.org/details/7783

These files are from the hpcalc.org, check this site for many programs and text files for various HP Graphing calculators. 

Eddie

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

TI 84 Plus CE: Nested Square Root Sums

TI 84 Plus CE:  Nested Square Root Sums

Introduction

The program NESTSQM calculates the sequence:

√(a + b)
√(a + b * √(a + b))
√(a + b * √(a + b * √(a + b))
√(a + b * √(a + b * √(a + b * √(a + b)))
...
√(a + b * √(a + b * ... * √(a + b)))

In other words, start with c = 1.
Then let c = √(a + b * c)
Repeat. 

The calculation is shown in steps of 5, for a total of 25 steps. 

TI-84 Plus CE Program: NESTSQSM

"2020-01-05 EWS"
Disp "√(A+B√(A+B√(A+B...","25 ITERATIONS","TI-84+ CE"
Prompt A,B
1→C
For(K,1,25)
√(A+B*C)→C
Disp C
If fPart(K/5)=0
Then
Disp " "
Disp toString(K-4)+" TO "+toString(K)
Pause 
ClrHome
End
End

Examples

Example 1:  a = 2, b = 3

2.236067977
2.95096661
3.294373966
3.447190436
3.513057259

3.541069299
3.552915408
3.557913184
3.5600196
3.560907019

3.561280817
3.561438256
3.561504565
3.561532493
3.561544255

3.561549208
3.561551295
3.561552173
3.561552544
3.561552699

3.561552765
3.561552793
3.561552804
3.561552809
3.561552811

Example 2:  a = 7, b = 4

3.31662479
4.501832867
5.000733093
5.196434583
5.271217917

5.299516173
5.310184996
5.314201726
5.315713207
5.316281861

5.316495786
5.316576262
5.316606535
5.316617923
5.316622207

5.316623819
5.316624425
5.316624653
5.316624739
5.316624771

5.316624783
5.316624788
5.316624789
5.31662479
5.31662479

Eddie

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

HP 42S/DM42S/Free42: Atmospheric Refraction

HP 42S/DM42S/Free42: Atmospheric Refraction

Introduction

The program ATREF calculates the atmospheric refraction and the true "airless" altitude of a light from a star or any atmospheric object due to the Earth's atmosphere.   As a result, the true altitude is generally lower than the apparent altitude.

Jean Meeus' "Astronomical Algorithms" (see source below) presents an approximation of calculating refraction by G.G. Bennett (University of New South Wales):

R = 1/(tan h_0 + 7.31/(h_0 + 4.4))

where:

R =  atmospheric refraction, in arc minutes

h_0 = apparent altitude (the altitude you see), in hours-degrees-seconds format (HH.MMSSSS)

True altitude, in hours-degrees-seconds format (HH.MMSSSS) is calculated as:

h = R - h_0


HP 42S/DM42/Free 42 Program ATREF

00 { 74-Byte Prgm }
01▸LBL "ATREF"
02 DEG
03 "APP ALT?"
04 PROMPT
05 STO 00
06 →HR
07 ENTER
08 ENTER
09 4.4
10 +
11 1/X
12 7.31
13 ×
14 +
15 TAN
16 1/X
17 STO 01
18 "REF: "
19 ARCL ST X
20 ├"'"
21 AVIEW
22 STOP
23 100
24 ÷
25 RCL 00
26 X<>Y
27 HMS-
28 "TRUE ALT:"
29 ARCL ST X
30 AVIEW
31 .END.

Example

Input:  h_0:  35'  (35 arcminutes, enter as 0.35)

Output:
REF: 27.9342'  (27.9342 arcminutes)  (R/S)
TRUE ALT:  0.0667   (6.67 arcminutes)
 
Source:

Meeus, Jean.  Astronomical Algorithms.  Willams-Bell Inc:  Richard, VA 1991 ISBN 0-943396-35-2

Eddie

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

HP 42S/DM42/Free42: Predicting Freezing Levels and Turn Performance

HP 42S/DM42/Free42:  Predicting Freezing Levels and Turn Performance

Predicting Freezing Levels

The program FREEZE calculates the freezing elevation heights for two situations:

Dry:  Freezing level in clear weather.   The Aviation Pac (see source below) uses a drop rate of 2 °C/1000 ft in its calculation.

Wet:  Freezing level in clouds on a relatively clear day.  Accuracy tends to lessen for cloudy or rainy days.  The Aviation Pac (see source below) uses a drop rate of 1.5   °C/1000 ft in its calculation.

In general, the freezing level is calculated as:

FL = ALT + T * drop rate

ALT = altitude of the observer
T = temperature

The program FREEZE allows the user to choose from a set of units: (Fahrenheit vs. Celsius,  feet vs. meters).

1.  °F, ft
2.  °C, ft
3.  °F, m
4.  °C, m

HP 42S/DM42/Free42 Program FREEZE

00 { 204-Byte Prgm }
01▸LBL "FREEZE"
02 "TEMP?"
03 PROMPT
04 CLMENU
05 "°F FT"
06 KEY 1 GTO 01
07 "°C FT"
08 KEY 2 GTO 02
09 "°F M"
10 KEY 3 GTO 03
11 "°C M"
12 KEY 4 GTO 04
13 MENU
14▸LBL 00
15 STOP
16 GTO 00
17▸LBL 01
18 32
19 -
20 1ᴇ3
21 ×
22 ENTER
23 ENTER
24 3.6
25 ÷
26 X<>Y
27 2.7
28 ÷
29 GTO 05
30▸LBL 02
31 1ᴇ3
32 ×
33 ENTER
34 ENTER
35 2
36 ÷
37 X<>Y
38 1.5
39 ÷
40 GTO 05
41▸LBL 03
42 32
43 -
44 1ᴇ3
45 ×
46 ENTER
47 ENTER
48 1.09728
49 ÷
50 X<>Y
51 0.82296
52 ÷
53 GTO 05
54▸LBL 04
55 1ᴇ3
56 ×
57 ENTER
58 ENTER
59 0.6096
60 ÷
61 X<>Y
62 0.4572
63 ÷
64 GTO 05
65▸LBL 05
66 "ALTITUDE?"
67 PROMPT
68 STO+ ST Z
69 STO+ ST Y
70 R↓
71 CLMENU
72 EXITALL
73 "Y: DRY X:WET"
74 AVIEW
75 STOP
76 RTN
77 .END.

Example:
Temperature:  40 °F
Altitude:  3970 ft  (choose °F, ft)

Results:
Dry:  6192.2222 ft
Wet:  6932.9630 ft

Download freeze_level.raw here:  https://drive.google.com/open?id=13rIbpyxaR73DZnP-kau4r5i1PvQPo-_u

Turn Performance

The program TURN calculates four parameters when it comes to performance of an aircraft:

1.  The G-force

2.  The stall speed when bank angle is considered

3.  The diameter of an airplane's 360° turn

4.  The time it takes an airplane to turn 360°

The program sets the calculator to Degrees Mode.  The units are in feet for distance and knots for speed.

Memory Registers Used:

Input:
R01 = bank angle, in degrees (prompted)
R02 = true airspeed, TAS, in knots (prompted)
R03 = stall speed, in knots (prompted)

Output:
R04 = G-Force
R05 = turn diameter in nautical miles
R06 = time for a 360° to be completed in minutes
R07 = stall speed when bank angle is considered, in knots

HP 42S/DM42/Free42 Program TURN

00 { 157-Byte Prgm }
01▸LBL "TURN"
02 DEG
03 "SPEED IN KNOTS"
04 AVIEW
05 PSE
06 PSE
07 "TRUE AIR SPEED?"
08 PROMPT
09 STO 02
10 "NORM STALL?"
11 PROMPT
12 STO 03
13 "BANK? °"
14 PROMPT
15 STO 01
16 COS
17 1/X
18 STO 04
19 "G FORCE:"
20 ARCL ST X
21 AVIEW
22 STOP
23 SQRT
24 RCL× 03
25 STO 07
26 "STALL: "
27 ARCL ST X
28 AVIEW
29 STOP
30 RCL 01
31 TAN
32 1/X
33 RCL× 02
34 ENTER
35 ENTER
36 RCL× 02
37 34028
38 ÷
39 STO 05
40 "DIA: "
41 ARCL ST X
42 ├" N.M."
43 AVIEW
44 STOP
45 X<>Y
46 55ᴇ-4
47 ×
48 STO 06
49 CLA
50 ARCL ST X
51 ├" MIN"
52 AVIEW
53 .END.

Example:

Input:
True Air Speed (cruising speed):  107 knots
Stall speed:  54 knots
Bank:  30°

Output:
G Force:  1.1547
Stall:  58.0268 knots
Diameter:  0.5828 nautical miles
Time:  1.0193 minutes  (about 1 minute, 1.1 seconds)

Download turn_performance.raw here:  https://drive.google.com/open?id=1a_JFufFZUrRho44j-q4q25gy_BAZckr0

Source:

"Predicting Freezing Levels" and "Turn Performance"   HP 65 Aviation Pac 1.  Hewlett Packard, 1974


Eddie

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

HP 42S/DM42/Free42: Rate of Climb and Descent, Head and Cross Winds

HP 42S/DM42/Free42:   Rate of Climb and Descent, Head and Cross Winds

Rate of Climb and Descent

The solver CLIMB creates a solver of the equation:

ROC = TAS * ALT / √(DIST^2 + ALT^2)

ROC:  rate of climb, usually in ft/min
TAS:  true airspeed of the airplane, usually in knots
ALT:  (vertical distance) the change in elevation, take into the account the height of your airplane, the height of the mountain or obstacle to be cleared plus desired clearance height, usually in feet
DIST:  (horizontal distance) distance to the mountain or obstacle to be cleared

For the solver to accurate, you must keep the units consistent (feet or nautical miles for distance,  ft/min or knots for speed and rate of climb)

Conversion factors:

1 knot = 101.269 ft/min

1 nautical mile = 6076.12 ft

HP 42S/DM42/Free42 Solver program CLIMB

00 { 61-Byte Prgm }
01▸LBL "CLIMB"
02 MVAR "TAS"
03 MVAR "ALT"
04 MVAR "DIST"
05 MVAR "ROC"
06 RCL "TAS"
07 RCL× "ALT"
08 RCL "DIST"
09 X↑2
10 RCL "ALT"
11 X↑2
12 +
13 SQRT
14 ÷
15 RCL- "ROC"
16 .END.

Example:
TAS = 90 knots = 9114.21 ft/min
ALT = 5000 ft
DIST = 16 nautical miles = 97217.92 ft

Solve for ROC:  468.1328 ft/min

Link to download (climb_solver.raw):  https://drive.google.com/open?id=1Zd_Gyj8RJ_ehaozjBB9hfP5Gj_s1QBAS

Head Winds and Cross Winds

The program WINDS calculates the head wind and cross wind (right is positive, left is negative) given the following inputs:

D:  reported wind direction
HDG:  heading of the aircraft
V:  compass magnetic variation, if any 

The directions are entered in degrees, measured from true north, clockwise

K:  reported wind velocity

Head wind:
HW = K cos(D - HDG - V)

Cross wind:
CW = K sin(D - HDG - V)

We can use the polar to rectangular conversion function with the following convention:

θ = D - HDG - V
r = K

HP 42S/DM42/Free42 Program WINDS

00 { 79-Byte Prgm }
01▸LBL "WINDS"
02 DEG
03 "WIND DIR?"
04 PROMPT
05 "HEADING?"
06 PROMPT
07 -
08 "COMP VAR?"
09 PROMPT
10 -
11 "WIND VELOCITY?"
12 PROMPT
13 →REC
14 "Y:CROSS X:HEAD"
15 AVIEW
16 STOP
17 RTN
18 .END.

Example:
Wind Direction:  30°
Heading of Aircraft:  350°
No compass adjustment
Wind Velocity:  20 knots

Results:
Y: cross winds:  12.8558 knots (from the right)
X:  head winds:  15.3209 knots

Link to download (winds_head_and_cross.raw):  https://drive.google.com/open?id=1RoIKgbnAWmT36pLn6MHMqKXmUw19e3wh

Source:

"Rate of Climb and Descent" and "Head Winds and Cross Winds"   HP 65 Aviation Pac 1.  Hewlett Packard, 1974

Eddie

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

Retro Review: Sharp EL-506A

Retro Review: Sharp EL-506A



Quick Facts:

Model:  EL-506A
Company:  Sharp
Type:  Scientific
Years:  Introduced 1985
Display:  10 digits
Batteries:  Battery, 1.5 V. 

Special thanks to Tom Manning for furnishing this calculator.  Much appreciated. 

The calculator comes in a compact folding wallet. 

Features

The available modes are:

Decimal Mode:  This is the normal scientific calculator mode. 

The EL-506A has two memory registers, M1 and M2.   There are three keys dedicated to the memory registers:  [ x→M ] (store), [ RM ] (recall), and [ M+] (storage addition).  Memory 1 is the primary key while memory 2 is the secondary key.  Contents of the memory registers are retained even when the calculator is turned off. 

Complex Mode:  Use the [ a ] and [ b ] keys for complex number arithmetic calculations.  Rectangular and Polar conversions are included in this mode ( →xy, →rθ).  Complex mode is toggled on and off by the [ 2ndF ] [ . ].

Base Conversions:  Binary, Octal, and Hexadecimal modes are toggled by the key sequences [ 2ndF ] [ ÷ ], [ 2ndF ] [ × ], and [ 2ndF ] [ - ] respectively.  When going to these modes, the number in the displayed is converted.  Boolean functions  include NOT, AND, OR, XOR, XNOR, and NEG.

3-VLE Mode:  The 3-Variable mode solves 3 x 3 systems of linear equations:

a1 * x + b1 * y + c1 * z = d1
a2 * x + b2 * y + c2 * z = d2
a3 * x + b3 * y + c3 * z = d3

The mode solves for x, y, and z, and gives the determinant of the matrix

[ [ a1, b1, c1 ]
[ a2, b2, c2 ]
[ a3, b3, c3 ] ]

The 3-VLE mode becomes a stable for advanced Sharp scientific calculators during the late 1980s and 1990s. 

The mode is toggled on and off with the [ 2ndF ] [ +/- ] sequence.

Statistics Mode:  The EL-506A has one variable statistics.  There are three functions to transform data in normal distribution calculations.

→t:  Calculates (x - μ) / σ
→t Q(t):  Calculates the area between 0 to t
→t P(t): Calculates the area between -∞ to t

The statistics mode is toggled on and off with the [ 2ndF ] [ ON/C ].  I am not a fan of this key sequence, but thankfully it works because the calculator is not solar powered. 

Keyboard

The keyboard is a clean design.  Despite the small keys, the keys are responsive and easy to operate. 

Verdict

The EL-506A is a nice vintage calculator with several advanced features like base conversions, the normal distribution functions, and 3 x 3 linear system solver. 

Source:

"Sharp EL-506A"  calculator.org
https://www.calculator.org/calculators/Sharp_EL-506A.html
Retrieved December 19, 2019

Eddie

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

HP 42S & DM 42 Linear Progression of a Slider Crank

HP 42S & DM 42 Linear Progression of a Slider Crank

Introduction

Welcome to first post of 2020!  In today's post, the program CRANK will calculate the following:

*  Maximum (xMAX) and Minimum (xMIN) slider displacement of a slider crank using linear progression

* Connecting rod angle, slider displacement, the slider's velocity, and slider's acceleration given the crank angle

Input values are:



*  Connecting rod length  (L)

*  Crank radius  (R)

*  Vertical slider offset  (E)

*  Current speed of the crankshaft, in revolutions per minute (RPM)

*  Crank angle (θ)

The program does not dictate units of measure (such as inches, millimeters, etc).   However, all angles are measured in degrees and the program sets the calculator to Degrees mode. 

HP 42S/DM42 Program:  Linear Progression of a Slider Crank

00 { 317-Byte Prgm }
01▸LBL "CRANK"
02 DEG
03 CLMENU
04▸LBL 00
05 "LNGTH"
06 KEY 1 GTO 01
07 "ANGLE"
08 KEY 2 GTO 02
09 "LIMITS"
10 KEY 3 GTO 03
11 "∡ v a"
12 KEY 4 GTO 04
13 "EXIT"
14 KEY 5 GTO 05
15 MENU
16▸LBL 10
17 STOP
18 GTO 10
19▸LBL 01
20 "ROD LGTH:"
21 PROMPT
22 STO 01
23 "RADIUS:"
24 PROMPT
25 STO 02
26 "OFFSET:"
27 PROMPT
28 STO 03
29 "RPM:"
30 PROMPT
31 STO 04
32 "DONE"
33 AVIEW
34 GTO 00
35▸LBL 02
36 "ANGLE:"
37 PROMPT
38 STO 05
39 "DONE"
40 AVIEW
41 GTO 00
42▸LBL 03
43 RCL 03
44 RCL 02
45 RCL+ 01
46 ÷
47 ASIN
48 COS
49 RCL 02
50 RCL+ 01
51 ×
52 "xMAX="
53 ARCL ST X
54 AVIEW
55 STOP
56 RCL 03
57 RCL 01
58 RCL- 02
59 ÷
60 ASIN
61 COS
62 RCL 01
63 RCL- 02
64 ×
65 "xMIN="
66 ARCL ST X
67 AVIEW
68 STOP
69 GTO 00
70▸LBL 04
71 PI
72 RCL× 04
73 30
74 ÷
75 STO 07
76 RCL 05
77 SIN
78 RCL× 02
79 RCL+ 03
80 RCL÷ 01
81 ASIN
82 STO 06
83 "CRANK ∡="
84 ARCL ST X
85 AVIEW
86 STOP
87 RCL 02
88 RCL 05
89 COS
90 ×
91 RCL 01
92 RCL 06
93 COS
94 ×
95 +
96 "POS="
97 ARCL ST X
98 AVIEW
99 STOP
100 RCL 05
101 RCL+ 06
102 SIN
103 +/-
104 RCL 06
105 COS
106 ÷
107 RCL× 07
108 RCL× 02
109 "VELOCITY="
110 ARCL ST X
111 AVIEW
112 STOP
113 RCL 05
114 RCL+ 06
115 COS
116 +/-
117 RCL 06
118 COS
119 ÷
120 RCL 05
121 COS
122 X↑2
123 RCL× 02
124 RCL 06
125 COS
126 3
127 Y↑X
128 RCL× 01
129 ÷
130 -
131 RCL 07
132 X↑2
133 ×
134 RCL× 02
135 "ACCEL="
136 ARCL ST X
137 AVIEW
138 STOP
139 GTO 00
140▸LBL 05
141 CLMENU
142 EXITALL
143 RTN
144 END

Download:  https://drive.google.com/open?id=1z0Htza_-quZ4VLIddSqTg54pM_54_uFP

Instructions

1.  Run CRANK by pressing XEQ CRANK

2.  Enter rod length (ROD LGTH), crank radius (RADIUS), offset (OFFSET), and turning speed (RPM) by pressing the LNGT submenu.  After all the input values are entered, you will see a DONE message.  Use the [R/S] key to enter values. 

3.  To enter a crank angle, choose the ANGL submenu.  Enter the crank angle.  After the angle has been entered, you will see a DONE message. 

4.  Calculate the maximum and minimum slider displacements by choosing the LIMIT submenu.

5.  Calculate the rod angle, position, velocity, and acceleration by the ∠ v a  submenu.

6.  You can renter any of the inputs at any time. 

7.  To exit the program, press EXIT.

Example
(Fix 4 Setting)

Rod length:  8 in
Crank radius:  2 in
Offset:  1.3 in
RPM:  5000 RPM

Crank Angle:  15°

Results:
xMAX=9.9151
xMIN=5.8575

CRANK ∠=13.1326
POS=9.7226
VELOCITY=-507.0277
ACCEL=-634,997.3666

Crank Angle:  20°

(xMAX and xMIN remain the same)

CRANK ∠=14.3595
POS=9.6295
VELOCITY=-610.0807
ACCEL=-600,369.9284

Source:

"Linear Progression of Slide Crank"  HP 65  Machine Pac-1. Hewlett Packard.  1975

Eddie

All original content copyright, © 2011-2020.  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 42S/DM42: Height of a Fire, Time to Clear a Corridor

 HP 42S/DM42:  Height of a Fire, Time to Clear a Corridor HP 42S/DM42/Free42 Program:  FIREHGT The program FHGT approximates the height of a...