ToolkitP - TVM, NewtonP, Stat5P, CurveP, StrayLightP - J E Patterson

J E Patterson - jepspectro.com - 20231119

Description


This Toolkit is intended to help a little with the development of scientific equipment and processing the data produced. If income is earned the Toolkit can help with that too.

The program will run on Torsten Manz's hp-15c Simulator and SwissMicros DM15 calculator. The program is large at over 500 program steps, so extended memory needs to be set up.
In the hp-15c Simulator Preferences, under DM-15, set the number of registers to 229.
For the SwissMicros DM15, install the M1B extended memory version of the DM15 firmware.
This is the default when purchased.

Right clicking on GSB will display a data entry guide for each program. The indented entries are program subroutines. Print the following Toolkit Data Entry as a compact reminder.

Toolkit Data Entry


**********************************************************************************************************************


TVM - Time Value of Money - Accurate TVM usage instructions - Jeff Kearns

TVM starts at line 1 and finishes at line 40.

1. Store 4 of the following 5 variables, using appropriate cash flow conventions as follows:

n STO 1 --- Number of compounding periods
i STO 2 --- Interest rate (periodic) expressed as a %
PV STO 3 --- Present Value
PMT STO 4 --- Periodic Payment
FV STO 5 --- Future Value

Store the appropriate value (1 for Annuity Due or 0 for Regular Annuity) as
B/E STO 6 --- Begin/End Mode. The default is 0 for regular annuity or End Mode.

2. Store the register number X containing the floating variable to the indirect storage register as X STO I.

3. f SOLVE A

Example from the HP-15C Advanced Functions Handbook - Page 145 and Page 151

"Many Pennies (alternatively known as A Penny for Your Thoughts):

A corporation retains Susan as a scientific and engineering consultant.
Her fee is one penny per second for her thoughts, paid every second of every day for a year.
Rather than distract her with the sounds of pennies dropping, the corporation proposes to deposit them for her into a bank account.
Interest accrues at the rate of 11.25 percent per annum compounded every second.
At year's end these pennies will accumulate to a sum

total = (payment) x ((1+i/n)^n-1)/(i/n)

where payment = -$0.01 = one penny per second. Note that, by convention, payment is negative and income is positive.
i = 0.1125 = 11.25 percent per annum interest rate,
n = 60 x 60 x 24 x 365 = number of seconds in a year.

Using her HP-15C, Susan reckons that the total will be $376,877.67.
But at year's end the bank account is found to hold $333,783.35 .
Is Susan entitled to the $43,094.32 difference?"

31,536,000 STO 1
(11.25/31,536,000) STO 2
0 STO 3
-0.01 STO 4
5 STO I
f SOLVE A

The HP-15C now gives the correct result: $333,783.35.

Thanks to Thomas Klemm for debugging the routine.
The code has been edited to reflect Thomas' suggested changes.

Jeff Kearns

The hyperbolic sine in this program calculates ex-1 more accurately using 2.sinh(x/2).ex/2 from this reference by Thomas Klemm (Post #14).

**********************************************************************************************************************

NewtonP - Newton-Raphson equation solver - J E Patterson

NewtonP starts at line 41 and finishes at line 68.

GSB B runs a Newton-Raphson solver which acts on f(x) = 0 under label E. Only one guess is required.
SOLVE the internal solver can also be run using two guesses.

Label E can hold any equation of the form f(x) = 0. Note that some of the hp-15C Owner's Handbook examples may require some extra ENTER statements at the beginning as the stack is expected to be filled with x. The open box example on page 189 requires three ENTER statements at the beginning. This is the default example under label E.

Instructions

A problem from the hp-15c Owner's Handbook - page 189:


A 4 decimetre by 8 decimetre metal sheet is available, i.e. 400 mm by 800 mm.
The box should hold a volume V of 7.5 cubic decimetres, i.e. 7.5 litres.
How should the metal be folded for the tallest box in decimetres.
We are using decimetres rather than mm because equation entry is simplified.
Let x be the height.
Volume V = (8 - 2x)(4-2x)x. There are two sides and two ends of height x.
Rearrange to f(x) = 4((x - 6)x + 8)x - V = 0 and solve for the height x.

There are 3 solutions depending on the guesses.
The initial guess can be recovered with RCL 1

0 GSB B gives x = 0.2974 decimetres or 29.74 mm - a flat box
1 GSB B gives x = 1.5 decimetres or 150 mm - a reasonable height box.
2 GSB B gives x = 1.5 decimetres or 150 mm - a reasonable height box.
3 GSB B gives x = 0.2974 decimetres or 29.74 mm - a flat box. Here the secant line now intersects the x axis below the smallest root.
4 GSB B gives x = 4.2026 decimetres or 420.26 mm - an impossible box.

Solver

Choose a starting point x1
do
Calculate f(x1)
If x1 = 0 use 1 instead to avoid a divide by zero from the derivative f'(x1)
define h = 1/10000
calculate f'(x1) ≈ (f(x1+h) - f(x1))/h
calculate f(x1)/f'(x1)
subtract from x1
Loop until f(x1) = 0 within an error tolerance determined by the FIX, SCI or ENG significant digits setting.
Display root x1.

**********************************************************************************************************************

CurveP - Fit calibration curves - J E Patterson

CurveP starts at line 69 and finishes at line 221.

The program fits data that may be linear at low x,y amplitudes but y falls off at higher x values. This is a common issue in many physical systems. x1, y1 should preferably be on the linear part of the curve. CurveP is not a regression. It assumes that the data is reasonably precise. Linear and power fit data sets also work well.

The equation used is:

y = a.xb + c.x.e-d.x

See Curve Fitting at jepspectro.com.

Originally chart recorders were used to obtain data which occupied the y axis, leaving interpreted results naturally plotted on the x axis, when graphed on the same paper. Here we are using y as the equation output axis.

The parameters a = scale, b = order, c = slope and d = factor are calulated by iteration using 3 standards and a blank. x is first normalised, the equation solved and un-normalised to get y. This limits the magnitude of calculated values in the iteration.

y1, y2 and y3 are known standards with respective readings of x1, x2 and x3.

y1 ENTER, y2 ENTER, y3 GSB C
x1 ENTER, x2 ENTER, x3 R/S

Do not press ENTER after y3 or x3.
Note that y3>y2>y1 and x3>x2>x1.
After normalisation y3 = x3 = 10 so x3 is not saved. y3 is used instead in the program.

The curve runs through the origin and three points (x1,y1) (x2,y2) (x3,y3). The order of the upper part of the curve is displayed.

Enter x GSB D to get y.

If there is a blank value, enter it as data and subtract the output from all the results.

Test [x,y] data sets

[2,2 4,5 5,8] [1,1 2,4 3,9] [1,1 2,2 3,3] [20,3.69 30,8.64 47,22.16]
The last data set relates X-ray fluorescence k line energy in keV to the element atomic number - see Moseley's Law.

Notes:

In this update I have improved the starting values for the iteration. Order is limited to 10.

Because only 3 standards and a blank are used a regression approach is not suitable. The iteration attempts to fit the standards and blank exactly. The standards need to be accurately prepared. The calibration curve can be validated by running other standards as samples.

**********************************************************************************************************************

Stat5P - Linear, logarithmic, power and exponential regressions - J E Patterson

Stat5P starts at line 222 and finishes at line 423.

This program provides linear, logarithmic, power and exponential regressions with a single entry of a data set.

This program is an adaptation of software I wrote for a personal computer in 1984. For most statistical work a personal computer is best, but this program is good for a first look at experimental data.

Introduction:

Entered numbers should be positive.
Enter 1 EEX 9 CHS in place of zero.
For linear regressions the built-in HP-15 linear-regression function can be used if a wider number range is required.
The most recent data pair can be deleted with GSB .6. The statistics counter n is also decremented by 1.
GSB 9 - zeros registers and clears flag 1.
If there is an obvious inverse relationship between x and y press GSB .7 which sets flag 1 to 1. This inverts any x data entered.

y ENTER x GSB 1
Repeat to enter more data.

GSB 2 for linear regression y = ax+b
GSB 3 for logarithmic regression y = a ln(x) + b
GSB 4 for power regression y = xa * b
GSB 5 for exponential regression y = eax * b

On pressing any of these keys b is first displayed, then a and finally the correlation coefficient r is left in the display.

x' R/S displays a y' estimate.

GSB 2, 3, 4, and 5 can be repeated at any time without entering new data.


Example:

y = 2, 4, 5, 6
x = 2, 5, 8, 13

GSB 9 to clear registers
2 ENTER 2 GSB 1
4 ENTER 5 GSB 1
5 ENTER 8 GSB 1
6 ENTER 13 GSB 1

GSB 2
Linear regression y = ax+b
b = 1.8106
a = 0.3485
r = 0.9571

GSB 3
Logarithmic regression y = a ln(x) + b
b = 0.5318
a = 2.1409
r = 0.9999

GSB 4
Power regression y = xa * b
b = 1.4005
a = 0.5950
r = 0.9870

GSB 5
Exponential regression y = eax * b
b = 2.0563
a = 0.0928
r = 0.9048

Clearly a logarithmic fit to the data is reasonable because the correlation coefficient r is closest to 1.
Once r is displayed x' can be entered to estimate y'
Note that a can also be recovered with RCL . 1 and b with RCL . 0.

5 R/S displays 3.9774 as the y' estimate instead of the original y entry of 4.
Repeat for more values of x'. This applies for all regression models.
Note that even with r = 0.9999 the fit is not quite perfect. To 6 places r = 0.999911.

It is easy to compare different regression models. Just enter GSB 2 to GSB 5 as often as required to show b, a and r for the different regression models and then enter x' R/S to estimate y'.

Test data sets

Linear y = ax+b
x = 1, 2, 3, 4
y = 7, 9, 11, 13
b = 5.0000
a = 2.0000
r = 1.0000
3 R/S displays 11.0000


Logarithmic y = a ln(x) + b
x = 1, 2, 3, 4
y = 5, 6.3863, 7.1972, 7.7726
b = 5.0000
a = 2.0000
r = 1.0000
3 R/S displays 7.1972.


Power y = xa * b
x = 1, 2, 3, 4
y = 5, 20, 45, 80
b = 5.0000
a = 2.0000
r = 1.0000
3 R/S displays 45.0000.


Exponential y = eax * b
x = 1, 2, 3, 4
y = 36.9453, 272.9908, 2017.1440, 14904.7899
b = 5.0000
a = 2.0000
r = 1.0000
3 R/S displays 2017.1442.

**********************************************************************************************************************

StrayLightP - Stray light curve correction - J E Patterson

StrayLightP starts at line 424 and finishes at line 499.

Spectrophotometers have some stray light or detector dark current which causes the calibration to be non linear at high absorbances.

Absorbance = Log (Incident light Intensity)/(Transmitted light Intensity).

This program corrects for the calibration curvature caused by the presence of stray light.

Absorbance A = log(Io/I) .... ideal
Io is the incident light intensity and I is the transmitted light intensity.
A' = log(Io+Is)/(I+Is) .... measured absorbance
Is is the stray light intensity (or the dark current in the detector)
A = A'-log(k(1-10A')+1 ....................................................... (1)
where k = Is/Io and 100k = % stray light
k = (10(A'-A)-1)/(1-10A')
C1 and C2 are standards and A1' and A2' are the measured absorbances.
k2 = (10(A2'-A2)-1)/(1-10A2') ............................................... (2)
Substituting A1 in equation (1)
A1 = A1'-log(k1(1-10A1')+1)
For ideal absorbances A2 = A1(C2/C1)
A2 = (A1'-log(k1((1-10A1')+1)C2/C1 ................................ (3)

Equation (3) can be substituted in equation (2) and an iteration runs until (k1 - k2)*100 = 0 within an error tolerance determined by the FIX, SCI or ENG significant digits setting.
The value for k is now set equal to k1, the last value calculated.
100k = % stray light

Input two standard concentration values C1 ENTER C2 GSB 6.
Input two corresponding absorbances A1' ENTER A2' R/S.
The % stray light is displayed. This is stored in register 8.

Input an unknown sample absorbance A' R/S the resulting concentration C' is displayed and stored in register 9.
Repeat.

Example 1:
Standard data: (Concentrations C1, C2 = 5, 10, Absorbances A1', A2' = 0.53, 0.83).
5 ENTER
1 0 GSB 6
. 5 3 ENTER
. 8 7 R/S
Stray light is 9.62%

This curvature is not unusual for Atomic Absorption spectrometry. Spectrophotometry can be much more linear in the near absence of stray light.

Example 2:
Unknown sample absorbance is 0.74
. 7 4 R/S
The unknown sample concentration is 7.66 units, using the same concentration units as the standards.
Repeat A' R/S for further samples.

********************************************************************************************************

Program Resources

Labels

Name Description Name Description Name Description
 A TVM n→1 i→2 PV→3 PMT→4 FV→5 B/E→6 X→I Solve A  4 Stat5P Power y=x^a*b, R/S=a, R/S=r, x'R/S=y', .3 Stat5P Logarithmic, estimate y' from x' loop
 B NewtonP Enter one guess, then GSB B  5 Stat5P Exp y=e^ax*b, R/S=a, R/S=r, x'R/S=y' .4 Stat5P, Power, estimate y' from x' loop
 C CurveP y1 ENTER y2 ENTER y3 GSB C, x1 ENTER x2 ENTER x3 R/S  6 Stray Light y1 ENTER y2 GSB 6, x1 ENTER x2 R/S .5 Stat5P Exponential, estimate y' from x' loop
 D CurveP x' GSB D=y', repeat  7 Stray Light x'GSB 7=y', repeat .6 Stat5P Delete most recent data pair, decrement n by 1
 E NewtonP or Solve - Equation to be solved  8 NewtonP loop and test .7 Stat5P Set flag 1 to 1
 0 Stray Light iteration  9 Stat5P Initialise - zero registers, set flag 1 to zero .8 CurveP Loop
 1 Stat5P Data Entry, y ENTER x GSB 1, repeat .0 Stat5P Linear or Logarithmic regression subroutine .9 CurveP RCL.5 1/x STO.5
 2 Stat5P Linear y=ax+b, R/S=a, R/S=r, x'R/S=y' .1 Stat5P Power or exponential regression subroutine
 3 Stat5P Log y=a*ln(x)+b, R/S=a, R/S=r, x'R/S=y' .2 Stat5P Linear, estimate y' from x' loop

Storage Registers

Name Description Name Description Name Description
 0 ∑x, Fraction decimal input value  7 ∑xy" copied from appropriate registers, xscale, temp 2 .4 ∑(lnx)^2, a - scale
 1 ∑x^2, y1, N, Result ,Guess 1, X1 conc  8 ∑y, yscale, % stray light .5 ∑lny, temp1
 2 n, y2, I, X2 conc  9 ∑y^2, c - slope .6 ∑(lny)^2, temp2
 3 ∑x" copied from appropriate registers, y3 .0 Temp x and b, absolute decimal number for fraction .7 ∑((lnx) * (Lny)), temp3
 4 ∑x^2" copied from appropriate registers, b-order, PMT, stray light fraction. .1 Temporary y and a storage, x1, y1 abs .8 ∑(x * lny), xinput
 5 ∑y" copied from appropriate registers, d-factor, FV, stray light old .2 ∑xy, x2, y2 abs .9 ∑(lnx *y)
 6 ∑y^2" copied from appropriate registers,count, B/E 1/0, temp 1 .3 ∑lnx, b - order first guess, yabs (i) Register number of TVM value required

Flags

Number Description
1 Invert x data flag

Program

Line Display Key Sequence Line Display Key Sequence Line Display Key Sequence
000 173 10 ÷ 346 12
001 42,21,11 f LBL A 174 15 1/x 347 45 .0 RCL . 0
002 44 24 STO (i) 175 1 1 348 20 ×
003 45 2 RCL 2 176 40 + 349 22 .5 GTO . 5
004 26 EEX 177 44 .7 STO . 7 350 43 32 g RTN
005 2 2 178 45,20, 4 RCL × 4 351 42,21, 9 f LBL 9
006 10 ÷ 179 44 4 STO 4 352 42 34 f REG
007 36 ENTER 180 45 .7 RCL . 7 353 43 35 g CLx
008 36 ENTER 181 1 1 354 43 32 g RTN
009 1 1 182 30 355 42,21, .0 f LBL . 0
010 40 + 183 43 16 g ABS 356 42 49 f L.R.
011 43 12 g LN 184 1 1 357 44 .0 STO . 0
012 34 x↔y 185 26 EEX 358 42 31 f PSE
013 43 36 g LSTx 186 16 CHS 359 34 x↔y
014 1 1 187 6 6 360 44 .1 STO . 1
015 43,30, 6 g TEST x≠y 188 43,30, 8 g TEST x<y 361 42 31 f PSE
016 30 189 22 .8 GTO . 8 362 1 1
017 10 ÷ 190 45 4 RCL 4 363 42 48 f ŷ,r
018 20 × 191 43 32 g RTN 364 34 x↔y
019 45,20, 1 RCL × 1 192 42,21,14 f LBL D 365 43 32 g RTN
020 36 ENTER 193 44 .8 STO . 8 366 42,21, .1 f LBL . 1
021 12 194 45,10, 7 RCL ÷ 7 367 42 49 f L.R.
022 45,20, 3 RCL × 3 195 45 3 RCL 3 368 12
023 34 x↔y 196 20 × 369 44 .0 STO . 0
024 2 2 197 44 .8 STO . 8 370 42 31 f PSE
025 10 ÷ 198 45 4 RCL 4 371 34 x↔y
026 42,22,23 f HYP SIN 199 14 372 44 .1 STO . 1
027 43 36 g LSTx 200 45,20, .4 RCL × . 4 373 42 31 f PSE
028 12 201 45 5 RCL 5 374 1 1
029 20 × 202 45,20, .8 RCL × . 8 375 42 48 f ŷ,r
030 2 2 203 16 CHS 376 34 x↔y
031 20 × 204 12 377 43 32 g RTN
032 45,20, 4 RCL × 4 205 45,20, .8 RCL × . 8 378 42,21, .6 f LBL . 6
033 26 EEX 206 45,20, 9 RCL × 9 379 45 .1 RCL . 1
034 2 2 207 40 + 380 44,30, 8 STO 8
035 45,10, 2 RCL ÷ 2 208 45,20, 8 RCL × 8 381 43 11 g
036 45,40, 6 RCL + 6 209 45 3 RCL 3 382 44,30, 9 STO 9
037 20 × 210 10 ÷ 383 11 √x̅
038 40 + 211 43 32 g RTN 384 43 12 g LN
039 45,40, 5 RCL + 5 212 42,21, .9 f LBL . 9 385 44,30, .5 STO . 5
040 43 32 g RTN 213 45 .5 RCL . 5 386 43 11 g
041 42,21,12 f LBL B 214 15 1/x 387 44,30, .6 STO . 6
042 44 .1 STO . 1 215 44 .5 STO . 5 388 45 .0 RCL . 0
043 44 1 STO 1 216 43 32 g RTN 389 44,30, 0 STO 0
044 42,21, 8 f LBL 8 217 42,21, 9 f LBL 9 390 43 11 g
045 45 .1 RCL . 1 218 42 34 f REG 391 44,30, 1 STO 1
046 32 15 GSB E 219 43, 5, 1 g CF 1 392 11 √x̅
047 44 .4 STO . 4 220 43 35 g CLx 393 43 12 g LN
048 45 .1 RCL . 1 221 43 32 g RTN 394 44,30, .3 STO . 3
049 43 20 g x=0 222 42,21, 1 f LBL 1 395 43 11 g
050 12 223 43, 6, 1 g F? 1 396 44,30, .4 STO . 4
051 26 EEX 224 15 1/x 397 45 .0 RCL . 0
052 4 4 225 44 .0 STO . 0 398 45 .1 RCL . 1
053 10 ÷ 226 34 x↔y 399 20 ×
054 44 .2 STO . 2 227 44 .1 STO . 1 400 44,30, .2 STO . 2
055 45,40, .1 RCL + . 1 228 44,40, 8 STO + 8 401 45 .0 RCL . 0
056 32 15 GSB E 229 43 11 g 402 45 .1 RCL . 1
057 45,30, .4 RCL . 4 230 44,40, 9 STO + 9 403 43 12 g LN
058 45,10, .2 RCL ÷ . 2 231 11 √x̅ 404 20 ×
059 45 .4 RCL . 4 232 43 12 g LN 405 44,30, .8 STO . 8
060 34 x↔y 233 44,40, .5 STO + . 5 406 45 .0 RCL . 0
061 10 ÷ 234 43 11 g 407 43 12 g LN
062 44,30, .1 STO . 1 235 44,40, .6 STO + . 6 408 45 .1 RCL . 1
063 45 .4 RCL . 4 236 45 .0 RCL . 0 409 20 ×
064 43 34 g RND 237 44,40, 0 STO + 0 410 44,30, .9 STO . 9
065 43,30, 0 g TEST x≠0 238 43 11 g 411 45 .0 RCL . 0
066 22 8 GTO 8 239 44,40, 1 STO + 1 412 43 12 g LN
067 45 .1 RCL . 1 240 11 √x̅ 413 45 .1 RCL . 1
068 43 32 g RTN 241 43 12 g LN 414 43 12 g LN
069 42,21,13 f LBL C 242 44,40, .3 STO + . 3 415 20 ×
070 44 8 STO 8 243 43 11 g 416 44,30, .7 STO . 7
071 33 R⬇ 244 44,40, .4 STO + . 4 417 1 1
072 44 2 STO 2 245 45 .0 RCL . 0 418 44,30, 2 STO 2
073 33 R⬇ 246 45 .1 RCL . 1 419 45 2 RCL 2
074 44 1 STO 1 247 20 × 420 43 32 g RTN
075 45 8 RCL 8 248 44,40, .2 STO + . 2 421 42,21, .7 f LBL . 7
076 1 1 249 45 .0 RCL . 0 422 43, 4, 1 g SF 1
077 0 0 250 45 .1 RCL . 1 423 43 32 g RTN
078 44 3 STO 3 251 43 12 g LN 424 42,21, 6 f LBL 6
079 10 ÷ 252 20 × 425 44 2 STO 2
080 44,10, 2 STO ÷ 2 253 44,40, .8 STO + . 8 426 33 R⬇
081 44,10, 1 STO ÷ 1 254 45 .0 RCL . 0 427 44 1 STO 1
082 31 R/S 255 43 12 g LN 428 31 R/S
083 44 7 STO 7 256 45 .1 RCL . 1 429 44 .2 STO . 2
084 33 R⬇ 257 20 × 430 33 R⬇
085 44 .2 STO . 2 258 44,40, .9 STO + . 9 431 44 .1 STO . 1
086 33 R⬇ 259 45 .0 RCL . 0 432 0 0
087 44 .1 STO . 1 260 43 12 g LN 433 44 4 STO 4
088 45 7 RCL 7 261 45 .1 RCL . 1 434 42,21, 0 f LBL 0
089 45 3 RCL 3 262 43 12 g LN 435 45 4 RCL 4
090 10 ÷ 263 20 × 436 44 5 STO 5
091 44,10, .2 STO ÷ . 2 264 44,40, .7 STO + . 7 437 45 .1 RCL . 1
092 44,10, .1 STO ÷ . 1 265 1 1 438 1 1
093 45 3 RCL 3 266 44,40, 2 STO + 2 439 45 .1 RCL . 1
094 45 2 RCL 2 267 45 2 RCL 2 440 13 10ˣ
095 10 ÷ 268 43 32 g RTN 441 30
096 43 12 g LN 269 42,21, 2 f LBL 2 442 45 5 RCL 5
097 45 3 RCL 3 270 45 0 RCL 0 443 20 ×
098 45 .2 RCL . 2 271 44 3 STO 3 444 1 1
099 10 ÷ 272 45 8 RCL 8 445 40 +
100 43 12 g LN 273 44 5 STO 5 446 43 13 g LOG
101 10 ÷ 274 45 1 RCL 1 447 30
102 44 4 STO 4 275 44 4 STO 4 448 44 6 STO 6
103 44 .3 STO . 3 276 45 9 RCL 9 449 45 2 RCL 2
104 1 1 277 44 6 STO 6 450 45 1 RCL 1
105 44 5 STO 5 278 45 .2 RCL . 2 451 10 ÷
106 0 0 279 44 7 STO 7 452 20 ×
107 44 6 STO 6 280 32 .0 GSB . 0 453 44 7 STO 7
108 45 1 RCL 1 281 42,21, .2 f LBL . 2 454 45 .2 RCL . 2
109 45,10, .1 RCL ÷ . 1 282 31 R/S 455 45 7 RCL 7
110 44 9 STO 9 283 45 .1 RCL . 1 456 30
111 42,21, .8 f LBL . 8 284 20 × 457 13 10ˣ
112 1 1 285 45 .0 RCL . 0 458 1 1
113 44,40, 6 STO + 6 286 40 + 459 30
114 45 3 RCL 3 287 22 .2 GTO . 2 460 1 1
115 45 4 RCL 4 288 43 32 g RTN 461 36 ENTER
116 43,30, 7 g TEST x>y 289 42,21, 3 f LBL 3 462 45 .2 RCL . 2
117 45 .3 RCL . 3 290 45 .3 RCL . 3 463 13 10ˣ
118 44 4 STO 4 291 44 3 STO 3 464 30
119 45 3 RCL 3 292 45 .4 RCL . 4 465 10 ÷
120 45 5 RCL 5 293 44 4 STO 4 466 44 4 STO 4
121 45,20, 3 RCL × 3 294 45 8 RCL 8 467 45 5 RCL 5
122 16 CHS 295 44 5 STO 5 468 30
123 12 296 45 9 RCL 9 469 26 EEX
124 45,20, 3 RCL × 3 297 44 6 STO 6 470 2 2
125 45,20, 9 RCL × 9 298 45 .9 RCL . 9 471 20 ×
126 30 299 44 7 STO 7 472 43 34 g RND
127 45 3 RCL 3 300 32 .0 GSB . 0 473 43,30, 0 g TEST x≠0
128 45 4 RCL 4 301 42,21, .3 f LBL . 3 474 22 0 GTO 0
129 43,30, 2 g TEST x<0 302 31 R/S 475 45 4 RCL 4
130 45 .3 RCL . 3 303 43 12 g LN 476 26 EEX
131 44 4 STO 4 304 45 .1 RCL . 1 477 2 2
132 14 305 20 × 478 20 ×
133 10 ÷ 306 45 .0 RCL . 0 479 44 8 STO 8
134 44 .4 STO . 4 307 40 + 480 42,21, 7 f LBL 7
135 45,10, 1 RCL ÷ 1 308 22 .3 GTO . 3 481 31 R/S
136 45 .1 RCL . 1 309 43 32 g RTN 482 44 .3 STO . 3
137 45 4 RCL 4 310 42,21, 4 f LBL 4 483 1 1
138 14 311 45 .3 RCL . 3 484 45 .3 RCL . 3
139 20 × 312 44 3 STO 3 485 13 10ˣ
140 44 .5 STO . 5 313 45 .5 RCL . 5 486 30
141 1 1 314 44 5 STO 5 487 45 4 RCL 4
142 43,30, 8 g TEST x<y 315 45 .4 RCL . 4 488 20 ×
143 32 .9 GSB . 9 316 44 4 STO 4 489 1 1
144 1 1 317 45 .6 RCL . 6 490 40 +
145 45 .5 RCL . 5 318 44 6 STO 6 491 43 13 g LOG
146 30 319 45 .7 RCL . 7 492 30
147 43 12 g LN 320 44 7 STO 7 493 45 6 RCL 6
148 16 CHS 321 32 .1 GSB . 1 494 10 ÷
149 45,10, .1 RCL ÷ . 1 322 42,21, .4 f LBL . 4 495 45 1 RCL 1
150 44 5 STO 5 323 31 R/S 496 20 ×
151 45,20, .2 RCL × . 2 324 45 .1 RCL . 1 497 44 9 STO 9
152 16 CHS 325 14 498 22 7 GTO 7
153 12 326 45 .0 RCL . 0 499 43 32 g RTN
154 45,20, .2 RCL × . 2 327 20 × 500 42,21,15 f LBL E
155 45,20, 9 RCL × 9 328 22 .4 GTO . 4 501 36 ENTER
156 45 .4 RCL . 4 329 43 32 g RTN 502 36 ENTER
157 45 .2 RCL . 2 330 42,21, 5 f LBL 5 503 36 ENTER
158 45 4 RCL 4 331 45 0 RCL 0 504 6 6
159 14 332 44 3 STO 3 505 30
160 20 × 333 45 .5 RCL . 5 506 20 ×
161 40 + 334 44 5 STO 5 507 8 8
162 44 .6 STO . 6 335 45 1 RCL 1 508 40 +
163 45 2 RCL 2 336 44 4 STO 4 509 20 ×
164 45,10, 3 RCL ÷ 3 337 45 .6 RCL . 6 510 4 4
165 3 3 338 44 6 STO 6 511 20 ×
166 0 0 339 45 .8 RCL . 8 512 7 7
167 20 × 340 44 7 STO 7 513 48 .
168 45,10, 6 RCL ÷ 6 341 32 .1 GSB . 1 514 5 5
169 11 √x̅ 342 42,21, .5 f LBL . 5 515 30
170 45,20, .6 RCL × . 6 343 31 R/S 516 43 32 g RTN
171 45 .6 RCL . 6 344 45 .1 RCL . 1
172 45,30, 2 RCL 2 345 20 ×