## Sunday, February 16, 2020

### Casio fx-3650P: Circular Segment

Casio fx-3650P: Circular Segment

Introduction

Variables:
Y:  angle (in degree)
C:  chord length
D:  altitude
A:  area
B:  arc length

Program 1:  Given Chord Length and Altitude

Calculate:  Radius, Angle, Area, Arc Length

? → C : ? → D : Deg :
( ( C ÷ 2 )^2 + D^2 ) ÷ ( 2D ) → X ◢
2 cos^-1 ( ( X - D ) ÷ X ) → Y ◢
X^2 ÷ 2 * ( π Y ÷ 180 - sin Y ) → A ◢
X Y π ÷ 180 → B

Example:
Input C = 8,  D = 11.75

Y:  284.8004594 (angle)
A:  127.5950317 (area)
B:  32.58720643 (arc length)

Program 2:  Given Radius and Angle

Calculate:  Chord Length, Altitude, Area, Arc Length

? → X : ? → Y : Deg :
2 * sin(Y ÷ 2) → C ◢
2 X ( sin(Y ÷ 4))^2 → D ◢
X^2 ÷ 2 * ( π Y ÷ 180 - sin Y ) → A ◢
X Y π ÷ 180 → B

Example:
Input X = 17.25, Y = 204

C:  33.74609223 (chord length)
D:  20.83647667 (altitude)
A:  590.2462124 (area)
B:  61.41813638 (arc length)

Source:

John W Harris and Horst Stocker.  Handbook of Mathematics and Computational Science Spring:  New York.  2006 ISBN 978-0-387-94746-4

Announcement

I am going to have surgery this week and my family is having medical issues.  I will be taking some time off in the next few weeks.  Tomorrow I have a special post reviewing the classic TI-30 from 1976. Take care everyone and thank you so much for your support.  I love doing this blog.

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, February 15, 2020

### HP Prime and TI 84 Plus CE: Jacobi Elliptic Functions

HP Prime and TI 84 Plus CE:  Jacobi Elliptic Functions

Introduction

Jacobian Elliptic Functions are a set of twelve functions denoted by XY(U, K) where X and Y stands of letters c, s, n, and d.  Today's blog post will focus on three of the common Jacobi Elliptic Functions:

Sine Amplitude:  sn(u,k)
Cosine Amplitude:  cn(u,k)
Delta Amplitude:  dn(u,k)

Where u is a real number and k is a parameter between -1 and 1 inclusive

To determine any of the Jacobian Elliptic Functions, the integral has to be solved for X:

U = ∫( 1/√(1 - K^2 * sin^2(T)) dT from T = 0 to T = X)

Solving for X will represent the function am(U,K).

Then:
sn(U,K) = sin(X)
cn(U,K) = cos(X)
dn(U,K) = √(1 - K^2 * sin^2(X))

HP Prime App:  Jacobi Elliptic Functions

In a different approach, I have created a custom app, which is based on the Solver App named Jacobi Elliptic Functions, which you can download on the link above.

Symb View:  The four equations that are used for this app.  Leave all four checked.

Num View:  This is where you enter U and K.  Leave these boxes unchecked.  Press or touch (Solve) to get the other values am (X), sn (S), cn (C), and dn (D).

If you want to program ths app yourself, please see the screen shots above.

TI-84 Plus CE Program:  ELLIPFX

"EWS 2020-01-22"
.5→X:1→F:1→N
ClrHome
Disp "JACOBIAN ELLIPTIC","­1≤K and K≤1"
Prompt U,K
Repeat abs(N/F)≤1E­10
fnInt((1-K^2*sin(T)^2)^(­-1/2),T,0,X)-U→N
(1-K^2*sin(X)^2)^(­-1/2)→F
X-N/F→X
End
sin(X)→S
cos(X)→C
√(1-K^2*sin(X)^2)→D
ClrHome
Disp "U="+toString(U)
Disp "K="+toString(K)
Disp "AM="+toString(X)
Disp "SN="+toString(S)
Disp "CN="+toString(C)
Disp "DN="+toString(D)

Examples

Example 1:
U = 3
K = 0.5

Results:
AM(U,K) = 2.772166899
SN(U,K) = 0.3610799872
CN(U,K) = -0.932534848
DN(U,K) = 0.9835676442

Example 2:
U = 1.5
K = 0

Results:
AM(U,K) = 1.5
SN(U,K) = 0.9974949866
CN(U,K) = 0.0707372017
DN(U,K) = 1

Sources

"Jacobi elliptic functions"  Wikipeida.  https://en.wikipedia.org/wiki/Jacobi_elliptic_functions  Retrieved December 23, 2019

"Jacobi elliptic function sn,cn,dn (chart) Calculator"  Ke!san Online Calculator https://keisan.casio.com/exec/system/1180573437  Retrieved January 22, 2020

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, February 9, 2020

### HP 11C: Construction: Calculating the Number of Tiles

HP 11C:  Construction:  Calculating the Number of Tiles

Introduction

The 11C program presented will calculate the number of tiles needed for a rectangular room given:

*  room length and width, in feet
*  tile length and width, in feet
*  grout applied, if any, in inches
*  waste allowance %

For example, for a room of dimensions 12 feet 6 inches by 16 feet 8 inches, enter the room dimensions as 12.5 (12 + 6/12) and 16.66666667 (16 + 8/12), respectively.

Instructions:

Outside of User Mode:
Enter room length [ENTER] room width [ f ] [ A ]
Enter tile length [ENTER] tile width [ f ] [ B ]
Enter grout width [ f ] [ C ]
Enter waste allowance [ f ] [ D ]
Calculate the number of tiles, [ f ] [ E ]

In User Mode:
Enter room length [ENTER] room width [ √ ] (A)
Enter tile length [ENTER] tile width [ e^x ] (B)
Enter grout width [ 10^x ] (C)
Enter waste allowance [ y^x ] (D)
Calculate the number of tiles, [ 1/x ] (E)

Variables:
R1 = tile length (ft)
R2 = tile width (ft)
R3 = grout (in)
R4 = room length (ft)
R5 = room width (ft)
R6 = waste %

Number of tiles =

ceiling( (room length * room width) / ((tile length + grout) * (tile width + grout)) * (1 + waste%)

ceiling:  next highest integer

HP 11C Program: Number of Tiles

Step:  Key Code:  Key

001:  42,21,11:  LBL A
002:  44,5:  STO 5
003:  34:   X<>Y
004:  44, 4:  STO 4
005:  43, 32:  RTN

006:  42, 21, 12:  LBL B
007:  44, 1:  STO 1
008:  34:  X<>Y
009:  44, 2:  STO 2
010:  43, 32:  RTN

011:  42, 21, 13:  LBL C
012:  1:  1
013:  2:  2
014:  10:  ÷
015:  44, 3:  STO 3
016:  43, 32:  RTN

017:  42, 21, 14:  LBL D
018:  44, 6:  STO 6
019:  43, 32:  RTN

020:  42, 21, 15:  LBL E
021:  45, 5:  RCL 5
022:  45, 4:  RCL 4
023:  20:  *
024:  45, 1:  RCL 1
025:  45, 3:  RCL 3
026:  40:  +
027:  45, 2:  RCL 2
028:  45, 3:  RCL 3
029:  40:  +
030:  20:  *
031:  10:  ÷
032:  45, 6:  RCL 6
033:  43, 14:  %
034:  40:  +
035:  36:  ENTER
036:  42, 44:  X=0
037:  43, 40:  FRAC
038:  22, 0:  GTO 0
039:  33:  R↓
040: 1:  1
041: 40: +
042: 22,1:  GTO 1
043: 42,21,0:  LBL 0
044: 33: R↓
045: 42,21,1:  LBL 1
046: 43, 44: INT
047: 43, 32: RTN

Example

Room Dimensions:  14 feet by 13.5 feet
Tile Dimensions:  1 foot by 1 foot
Grout: 1/8 inch (0.125 inch)
Waste Percentage:  5

Result:  Number of Tiles:  195

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, February 8, 2020

### HP 42S and HP Prime: Rabbits vs Foxes

HP 42S and HP Prime: Rabbits vs Foxes

Introduction

The program presented today is based on the Rabbits vs. Foxes program for the HP 25 (see source below).  The program determines the population of rabbits and foxes over time as modeled by the differential equations:

Change in Rabbits:
dr/dt = 2 * r - α * r * f

Change of Foxes:
df/dt = -f + α * r  * f

where:
r = population of rabbits
f = population of foxes
α = probability of a rabbit encounters a fox
h = step

This is approximated by Euler's method.

The HP Prime program RABBIT25 displays a print screen of results of the desired amount of iterations.  The HP 42S program RAB25 displays the results one step at time in the format rrrrr.fffff  (rabbits.foxes), like the original HP 25 program.

HP Prime Program RABBIT25

EXPORT RABBIT25()
BEGIN
// 2020-01-20 EWS
// Based on the Rabbits vs
// Foxes HP 25 program
LOCAL α,h,r,f,k,n,a;

// initialize and input
INPUT({α,h,r,f,n},
"Rabbits vs Foxes",
{"α: ","h: ","r0:","f0:","n: "},
{"α","h","inital # rabbits",
"initial # foxes",
"# iterations"});
L0:={r}; L1:={f};

// compute data
MSGBOX("L0 = rabbit population,
L1 = fox population;
(0,1,2,...,n), size n+1");
HFormat:=0;
PRINT();
PRINT("Rabbits vs Foxes");
FOR k FROM 0 TO n DO
IF k≠0 THEN
a:=α*r*f;
r:=r+h*(2*r-a);
f:=f+h*(−f+a);
END;
PRINT(k+" R: "+IP(r)+" F: "+
IP(f));
END;

// end of program
END;

HP 42S/Free42/DM42 Program RAB25

00 { 58-Byte Prgm }
01▸LBL "RAB25"
02 STO 02
03 R↓
04 STO 03
05 FIX 05
06▸LBL 05
07 RCL 02
08 ENTER
09 ENTER
10 RCL 03
11 RCL 00
12 ×
13 ×
14 STO 04
15 X<>Y
16 -
17 RCL 01
18 ×
19 +
20 X<0 font="">
21 0
22 STO 02
23 RCL 03
24 2
25 ×
26 RCL 04
27 -
28 RCL 01
29 ×
30 RCL 03
31 +
32 X<0 font="">
33 0
34 STO 03
35 IP
36 RCL 02
37 IP
38 1ᴇ5
39 ÷
40 +
41 STOP
42 GTO 05
43 .END.

Note:  You can replace STOP with PSE, as many as you like, if you don't want to press R/S after each step.

Instructions:
Store α in R00, store h in R01, enter initial rabbit population

Example

Initial Populations:
Rabbits:  r = 300
Fixes:  f = 150
α = 0.01
h = 0.02

Iter:   Rabbits.Foxes  (rrrrr.ffff)
0:  300.00150
1:  303.00156
2:  305.00162
3:  307.00169
4:  309.00176
5:  311.00183
6:  312.00191
7:  312.00199
8:  312.00207
9:  312.00216
10: 311.00225
11: 309.00235
12: 307.00245
13: 304.00255
14: 301.00265
15: 297.00276

Source:

Randall B. Neff and Lynn Tilman "An Example of HP-25 Programming" Hewlett-Packard Journal: November 1975.  pg. 6
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, February 2, 2020

### Fun With the TI-59

Fun With the TI-59

The following programs can be used on the TI-58C, TI-58, TI-59, TI-66, and any applicable emulator such as the RCL 58, RCL 59, and TI-5x.

Vieta's Formula

Given the roots α, β, and γ we can calculate the coefficients of the general cubic equation a*x^3 + b*x^2 + c*x + d = 0 by:

s1 =  α + β + γ
s2 = α * β + β * γ + α * γ
p = α * β * γ

And the coefficients are:

a = 1
b = -s1
c = s2
d = -s3

The program displays a, b, c, and d.

TI-59 Program Vieta's Formula

000 76 LBL
001 11 A
002 42 STO
003 01 01
004 91 R/S
005 76 LBL
006 12 B
007 42 STO
008 02 02
009 91 R/S
010 76 LBL
011 13 C
012 42 STO
013 03 03
014 91 R/S
015 76 LBL
016 15 E
017 01 1
018 42 STO
019 04 04
020 91 R/S
021 43 RCL
022 01 01
023 85 +
024 43 RCL
025 02 02
026 85 +
027 43 RCL
028 03 03
029 95 =
030 94 +/-
031 42 STO
032 05 05
033 91 R/S
034 43 RCL
035 01 01
036 65 *
037 53 (
038 43 RCL
039 02 02
040 85 +
041 43 RCL
042 03 03
043 54 )
044 85 +
045 43 RCL
046 02 02
047 65 *
048 43 RCL
049 03 03
050 95 =
051 42 STO
052 06 06
053 91 R/S
054 43 RCL
055 01 01
056 65 *
057 43 RCL
058 02 02
059 65 *
060 43 RCL
061 03 03
062 95 =
063 94 +/-
064 42 STO
065 07 07
066 91 R/S

Example

Input:  α = 3, β = -5, γ = 6
Results: a = 1, b= -4, c = -27, d = 90

Random Numbers

Generate random numbers between 0 and 1 with this psuedorandom number generator.  You will need to enter a seed to start out.

Instructions:  enter a seed, [ RST ], [ R/S ].  Keep pressing [ R/S ] to generate additional random numbers.

TI-59 Program:  Psuedorandom Number Generator

000 85 +
001 89 PI
002 95 =
003 45 Y^X
004 05 5
005 95 =
006 22 INV
007 59 INT
008 91 R/S
009 81 RST

Source:  HP 25 Application Programs.  Hewlett Packard, 1975

Distance to the Horizon

This program computes the distance to an object, in nautical miles, given both the height of object (in feet) and height of the observer's eyes (in feet).

Formula:

distance = 1.144 * ( √HE + √H )

Instructions.   Enter HE, [ RST ], [ R/S ], enter H, [ R/S ]

TI-59 Program: Distance to the Horizon

000 34 SQRT
001 85 +
002 91 R/S
003 34 SQRT
004 95 =
005 65 *
006 01 1
007 93 .
008 01 1
009 04 4
010 04 4
011 95 =
012 91 R/S
013 81 RST

Example

Input:  HE = 9.5 ft, H = 222 ft
Results:  20.57126091 n.m.

Source:
"Distance To Or Beyond Horizon" (HAV 1-06A)  HP 65 Navigation Pac -1.  Hewlett Packard.  1974

Atmospheric Refraction

This program calculates atmospheric refraction of the light passing through the Earth's atmosphere given the apparent altitude of the light source, such as a star.

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

The angle is in degrees.   Enter the apparent altitude, h0, in degrees, minutes, seconds format (DD.MMSSSS).  The result, R, is in arcminutes.

000 60 DEG
001 88 DMS
002 42 STO
003 00 00
004 85 +
005 07 7
006 93 .
007 03 3
008 01 1
009 55 /
010 53 (
011 43 RCL
012 00 00
013 85 +
014 04 4
015 93 .
016 04 4
017 95 =
018 30 TAN
019 35 1/X
020 42 STO
021 01 01
022 91 R/S
023 81 RST

Example:

Input:  h0 = 43'24".  Enter as .4324
Result:  R = 26.63496931'

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

The program calculates head winds and cross winds given :

* wind velocity (K)
* the direction wind from due north, clockwise, in degrees (D)
* the plane's heading direction angle from due north, clockwise, in degrees (D)
* any adjustment for the compass (V)

Head Wind: HW = K * cos(D - HDG - V)
Cross Wind:  RCW = K * sin(D - HDG - V)

Instructions:
Enter K, [ R/S ], enter D, [ R/S ], enter HDG, [ R/S ], enter V, [ R/S ]

Cross wind is displayed.  Press [ x<>t ] to get head wind.

Note:  As a program step, CP clears the t register.

TI 59 Program:  Cross Winds and Head Winds

000 60 DEG
001 29 CP
002 32 X<->T
003 91 R/S
004 75 -
005 91 R/S
006 75 -
007 91 R/S
008 95 =
009 37 P->R
010 91 R/S
011 81 RST

Example

Input:
K = 25 mph
D  = 240 mph
HDG = 280 mph
V = 0

Results:
Cross Wind:  -16.09699024 mph [ x<>t ]

Source:
"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.

## Saturday, February 1, 2020

### Review: Calculated Industries Tradesman Calc

Quick Facts:

Model:  Tradesman Calc, Model Number 4400
Company:  Calculated Industries
Type:  Scientific, Construction
Years:  Introduced 2012
Display:  8 digits
Batteries:  Battery, 1 CR2016
Retail Price:  \$44.99, you can pay lower on internet searches.  I paid \$29.95 from WalMart.
Memory Registers: 10, Registers 1 through 9, M

Features

*  Units and unit conversions
*  Right Triangle Calculations
*  Ratio Calculations
*  Trigonometry
*  Geometry Calculations

Other mathematical functions:  reciprocal, powers, roots, degrees/degrees-minutes-seconds, parenthesis

The calculator operates in one of two modes:  Order and Chain

Order uses order of operations while chain completes calculations as keys are pressed (like a four-function calculator).  Order of operations is the default setting.

Fraction settings allow you to set the largest denominator, up to 64.

Unit and Unit Conversions

In keeping with the other construction calculators, the Tradesman Calc offers units and unit conversions.  Notice that the shift key is labeled Conv for this purpose.  You can easily add, subtract, multiply, and divide measurements.  For example to add 4 feet 5 inches with 6 feet 7 1/2 inches, press:

4 [ Feet ] 5 [ Inch ]   (Display:  4 - 5   FEET INCH)
[ + ] 6 [ Feet ] 7 [ Inch ] 1 [ / ] 2
[ = ]

Display:  11 - 0 1/2  FEET INCH  (11 feet, 1/2 inch)

You can convert the answer to decimal feet like this:

[ Conv ] [ Feet ]

Display:  11.041667  FEET

To convert to Inches:

[ Conv ] [ Inch ]

Display:  132.5  INCH

To meters:

[ Conv ] [ m ]

Display:  3.3655 M

Units also include temperature (°F, °C), weight and mass (lbs, dry oz, tns, kg, grams, metric tons, wt/vol), and length (yds, feet, inch, m, cm, mm Bd Ft).

Right Triangle Calculations

The [ Adj ] (adjacent side), [ Opp ] (opposite side), [ Hyp ] (hypotenuse), and [Angle] (angle and adjacent angle) keys are used to solve right triangle problems.  Any two of the variables can be known to solve for everything else.  For example:

Known:  Adjacent (run):  15 feet,  Opposite (rise):  13 feet 8 inches

[Conv] [ × ] (Clear All)  (as recommended by Calculated Industries)
15 [ Feet ] [ Adj ]
13 [ Feet ] 8 [ Inch ] [ Opp ]

[Hyp] 20.292308 feet
[Angle] 42.336999°

Ratio Calculations

Use the X, Y, and X:Y commands to store and calculate ratios.  Example:

For the ratio 5/8 find X when X/18.

5 [Conv] [ Adj ] (X)   (stores 5 in X)
8 [Conv] [ Opp ] (Y)   (stores 8 in Y)
[Conv] [ Hyp ] (X:Y)   Result:  1 = 1.6

18 [Conv] [ Opp ] (Y)  (stores 18 in Y)
[Conv] [ Adj ] (X)    Result:  X = 11.25

Trigonometry

The Tradesman Calc has the trigonometric functions sine, cosine, and tangent, with inverse.  All angles are measured in degrees.

Geometry

Geometric calculations includes circles, arcs, and regular polygons (including inside and outside diameter).

Keyboard

The keyboard is a pleasure to use.  Aside it being blue (blue is my favorite color), the keys have a pleasant touch and register perfectly.  The display is clear with prompts.  The Tradesman Calc comes with a hard case cover.  On the back of the calculator, there is a slot for a battery and another for user guide.

Verdict

For a trade industries, I recommend this calculator.  The calculator has a convenient solvers for common geometry shapes along with unit mathematics. If you are going to purchase the Tradesman Calc, I recommend so shopping for less than retail price.

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.

### TI-59: Geometric Areas

TI-59: Geometric Areas

Introduction

The program calculates areas of planar geometric shapes.  The following user keys are defined:

B:  Enter B

C:  Enter C

D:  Display the total area

E:  Clear the total area

A':  Calculate the area of an Ellipse:  π*A*B.  For a circle, A = B

B':  Calculate the area of a Rectangle:  A*B.  For a square, A = B

C':  Calculate the area of a Triangle using Heron's Formula.
S = (A + B + C)/2; √(S * (S - A) * (S - B) * (S - C))

D':  Calculate the area of Sector of a Circle:  π*B°*A^2/360
A:  radius, B: angle in degrees

E':  Calculate the area of a Regular Polygon:  (B * A^2)/(4 * tan(180°/B))
A:  length of a side, B:  number of sides (degrees)

Each calculation will add to the total area.

Memory Registers:

R01:  A
R02:  B
R03:  C
R04:  total area
R05:  S = (A + B + C)/2

The program is for the TI-58C, TI-58, TI-59, their emulators, and TI-66.

TI-59 Program:  Geometry Areas

000 76 LBL
001 11 A
002 42 STO
003 01 01
004 91 R/S
005 76 LBL
006 12 B
007 42 STO
008 02 02
009 91 R/S
010 76 LBL
011 13 C
012 42 STO
013 03 03
014 91 R/S
015 76 LBL
016 14 D
017 43 RCL
018 04 04
019 91 R/S
020 76 LBL
021 15 E
022 25 CLR
023 42 STO
024 04 04
025 91 R/S
026 76 LBL
027 16 A'
028 89 PI
029 65 *
030 43 RCL
031 01 01
032 65 *
033 43 RCL
034 02 02
035 95 =
036 44 SUM
037 04 04
038 91 R/S
039 76 LBL
040 17 B'
041 43 RCL
042 01 01
043 65 *
044 43 RCL
045 02 02
046 95 =
047 44 SUM
048 04 04
049 91 R/S
050 76 LBL
051 18 C'
052 53 (
053 43 RCL
054 01 01
055 85 +
056 43 RCL
057 02 02
058 85 +
059 43 RCL
060 03 03
061 54 )
062 55 /
063 02 2
064 95 =
065 42 STO
066 05 05
067 65 *
068 53 (
069 43 RCL
070 05 05
071 75 -
072 43 RCL
073 01 01
074 54 )
075 65 *
076 53 (
077 43 RCL
078 05 05
079 75 -
080 43 RCL
081 02 02
082 54 )
083 65 *
084 53 (
085 43 RCL
086 05 05
087 75 -
088 43 RCL
089 03 03
090 54 )
091 95 =
092 34 SQRT
093 44 SUM
094 04 04
095 91 R/S
096 76 LBL
097 19 D'
098 60 DEG
099 89 PI
100 65 *
101 43 RCL
102 02 02
103 65 *
104 43 RCL
105 01 01
106 33 X²
107 55 /
108 03 3
109 06 6
110 00 0
111 95 =
112 44 SUM
113 04 04
114 91 R/S
115 76 LBL
116 10 E'
117 53 (
118 01 1
119 08 8
120 00 0
121 55 /
122 43 RCL
123 02 02
124 54 )
125 60 DEG
126 30 TAN
127 65 *
128 04 4
129 95 =
130 35 1/X
131 65 *
132 43 RCL
133 02 02
134 65 *
135 43 RCL
136 01 01
137 33 X²
138 95 =
139 44 SUM
140 04 04
141 91 R/S

Example

5 [ A ]  6 [  B ]

[2nd] [ A' ]   Result:  94.24777961  (area of an ellipse with A = 5, B = 6)

[2nd] [ B' ]  Result:  30  (area of a rectangle with A = 5, B = 6)

9 [ C ]

[2nd] [ C' ]  Result: 14.14213562  (area of a triangle with A = 5, B = 6, C = 9)

9 [ A ] 60 [ B ]

[2nd] [ D' ]  Result: 42.41150082 (area of a circular sector A = 9, B = 60°)

9 [ A ] 8 [ B ]

[2nd] [ E' ]  Result:  391.1025971 (area of a polygon with a side length of 9 and 8 sides)

[ D ]  Total Area:  571.9040132

[ E ] clears total area

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 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
04 "LAST"
05 KEY 1 GTO 01
06 "MID"
07 KEY 2 GTO 02
08 "1ST"
09 KEY 3 GTO 03
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 +
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"
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"
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.

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.

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)))

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
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
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↓
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

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)