Saturday, November 30, 2024

TI-30Xa and HP 12C: Linear Interpolation

TI-30Xa and HP 12C: Linear Interpolation



Introduction


Linear interpolation allows us to estimate a point (x,y) given a linear relationship between points (x1,y1) and (x2,y2).


Given two points (x0, y0) and (x1, y1), and a point, x, we can easily estimate the y coordinate:


y = y0 + (x – x0) * (y1 – y0) / (x1 – x0)


Note that the slope of the line is:

m = (y1 – y0) / (x1 – x0)


This works the best when x is relatively real close to x0 and x1.


Fun fact, the y-intercept, where x = 0 can be calculated as:

b = y0 – x0 * m




TI-30Xa Algorithm: Linear Interpolation


This algorithm will require to enter information only once.


Store the following points:

x0 [ STO ] 1

y0 [ STO ] 2


Predict y:

[ ( ] x [ - ] [ RCL ] 1 [ ) ] [ × ] [ ( ] y1 [ - ] [ RCL ] 2 [ ) ] [ ÷ ] [ ( ] x1 [ - ] [ RCL ] 1 [ ) ] [ + ] y0 [ = ]




HP 12C Algorithm: Linear Interpolation


It turns out that we can use the linear regression functions for linear interpolation. Entering two points for linear regression will create a perfect line (with the correlation of 1 or -1). The algorithm presented is for the HP 12C, and a algorithm for other calculators can easily be made.


Keystrokes:


Enter (x0, y0) and (x1, y1):

[ f ] [ Clx ] (CLEAR FIN)

y0 [ ENTER ] x0 [ Σ+ ]

y1 [ ENTER ] x1 [ Σ+ ]


To calculate y:

x [ g ] [ 2 ] (y-hat, r)



Examples


Examples

X0

Y0

X1

Y1

X (Input)

Y (Output)

1

10

4.95

12

5.06

11

5.0050

2

21

48,057

23

52,165

22

50,111

3

1000

97.7

2000

94.2

1500

95.95



Source


“Linear interpolation” Wikipedia. Was Edited August 27, 2024. Retrieved September 4, 2024. https://en.wikipedia.org/wiki/Linear_interpolation


Until next time, as we head into the final month of 2024,



Eddie


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

Fun with the HP 30b

Fun with the HP 30b



Introduction





The following programs are for the HP 30b Business Professional. Did you know that the 30b has a programming mode? The program mode has room for 10 programs with a total of 290 steps, where each key press is counted. Thankfully, shifts and hold-shifts are merged steps.


I couldn’t get the MSG or R/S commands to work properly. Therefore I use an approach that I often use for the Voyager calculators (HP 11C, 12C, 15C): store everything first and then run the program.


Disp5 is like the PSE (pause) command, it stops the execution for a second. Disp can be set to 1-9. Disp1 lasts for 1/5 second.


All programs are done in the Algebraic instead of the RPN I usually do on HP calculators.


All the results in the examples, except the last one, are rounded to four decimal places.



Program 0: f(x,y) = (x * y) / (x + y)


f(x, y) = (x * y) / (x + y)


Store x in memory 1 and y in memory 2.


Prog 0 =

RCL 1

×

RCL 2

÷

( ↓

RCL 1

+

RCL 2

) Swap

=

Stop


Examples:

x = 1.5, y = 16; Result: 1.3714

x = 3.6, y = 32; Result: 3.2360

x = 8.7, y = 10; Result: 4.6524



Program 1: PITI – Principal, Interest, Taxes, and Insurance


This program calculates the monthly payment of PI (principal and interest) and PITI (principal, interest, taxes, and insurance). The program assumes that payments per year setting (P/YR) is set to 12.


Store to Memory:

M1: Annual insurance rate.

M2: Annual property tax rate.

N: number of payments

I/YR: interest rate of the loan

PV: amount of the loan


It assumed that there is no balloon payment (FV = 0), although this program can be modified to include balloon payments by removing the first two steps (0 FV).


Prog 1 =

0

FV

PMT

Disp5

Disp5

-

( R↓

RCL 1

+

RCL 2

) Swap

/

1

2

0

0

*

RCL PV

=

Stop


Examples:


N = 360

I/YR = 8.9%

PV = 289000

Insurance Rate = 1% (1 STO 1)

Property Tax Rate = 1.3% (1.3 STO 2)


Result:

PMT: -2304.60

PITI: -2858.51



N = 360

I/YR = 8.9%

PV = 289000

Insurance Rate = 1% (1 STO 1)

Property Tax Rate = 1.3% (1.3 STO 2)


Result:

PMT: -2304.60

PITI: -2858.51



Program 2: Quadratic Equation – Po-Shen Lo Method

This program solves the monic quadratic polynomial:


x^2 + B * x + C = 0


where the solutions:

U^2 = B^2 / 4 – C

x1, x2 = - B / 2 ± √(U^2)


Store to Memory:

M1: B

M2: C


Prog 2 =

RCL 1

X^2

/

4

-

RCL 2

=

STO 0

-

RCL 1

/

2

=

STO 3

Disp5

Disp5

-

2

*

RCL 0

=

STO 4

Stop


M3: root 1 ( -B / 2 + √(U^2) )

M4: root 1 ( -B / 2 + √(U^2) )


This program finds real roots only. If there are no real roots, then the program displays an error.


Examples:


x^2 – 2 * x – 24 = 0

B = -2 STO 1

C = -24 STO 2

Roots: 6, -4


x^2 – 10 * x + 21 = 0

B = -10 STO 1

C = 21 STO 2

Roots: 3, 7



Program 3: Lease with Advanced Payments (HP 12C – see source)


This program calculates the regular monthly payment of a lease when the borrower pays a set number of payments in advance. Payments per year (P/YR) is assumed to be set at 12 while the calculator is set to End of Period payments.


Store in Memory:

number of payments [ N ]

annual lease rate [ I/YR ]

residual value [ FV ]

number of payments to be made in advance [ STO ] 0

loan amount [ STO ] 1 (not PV)


Prog 3 =

0

PMT

0

PV

PV

+

RCL 1

=

STO 2

0

FV

RCL N

-

RCL 0

=

N

1

+/-

PMT

( R↓

PV

+

RCL 0

) Swap

1/X

*

RCL 2

=

Stop


Examples:


Total Payments: 48 [ N ]

Rate: 13 [ I/YR ]

Residual Value: 7,000 [ FV ]

Payments in Advance: 1 [ STO ] 0

Loan Amount: 25,000 [ STO ] 1


Result: -536.06



Total Payments: 60 [ N ]

Rate: 8.8 [ I/YR ]

Residual Value: 12,000 [ FV ]

Payments in Advance: 3 [ STO ] 0

Loan Amount: 118,000 [ STO ] 1


Result: -2,229.71



For those of you in the United States, Happy Thanksgiving!


Source


Hewlett Packard. HP 12C Financial Calculator: User’s Guide. Edition 5. 2008. San Diego, CA. pp. 124-126


Eddie


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

Monday, November 18, 2024

Spotlight: Akron Brass FireCalc Pocket Computer

Spotlight: Akron Brass FireCalc Pocket Computer



Welcome to a special Monday Edition of Eddie’s Math and Calculator blog.



This is an instance of a small gamble and the gamble paid off because the calculator works! I found a one of a kind calculator at the Redlands Thrift Store in Redlands, CA: the Akron Brass FireCalc Pocket Computer. The specialty is mathematical calculations in fire fighting. I paid $4.95, and it probably would cost, I guess $40-$50 or higher retail because this is a specialty calculator.


Akron Brass FireCalc Pocket Computer


Akron Brass FireCalc Pocket Computer


Akron Brass FireCalc Pocket Computer





Quick Facts



Model: FireCalc Pocket Computer

Company: Akron Brass

Timeline: ????

Type: Fire Science Solver, 4 Function Calculator

Memory: No conventional memory registers, but input in the solvers are stored in memory

Power: 2 x LR44 batteries



The four function calculator has a square key, [ x^2 ], along with a square root key [ √ ]. There are two clearing keys:

[ CLEAR DISPLAY ]: acts like as clear entry key, which makes the display show 0.

[ ALL CLEAR ]: clears all the registers, and the display shows AKRON.



The display holds room for 8 digits. The display also shows alphabetic characters being built from segments.

Disclaimer: I am not a fire fighter or an expert in fire fighting mathematics. This is another topic to explore. I am going to do the best I can in describing the functions of the calculator.



A Solver for Fire Fighters



The FireCalc Pocket Computer features eight solvers. I’m going to be give a summary of how each solver as described as in the manual (see the manual section below). The solvers are the top two rows of blue keys. U.S. units are used.


There are four rows of gray keys with measurements marked ¾” all the way to 6”. Those are quick entry keys. For example, pressing [ 1 ¾” ] enters 1.75 in one keystroke.



The solvers are:



[ ENGINE PRESSURE ]: calculates the engine pressure in psi (pounds per square inch) of the water hose (I think) given the pressure, flow (gallons per minute), and length of the hose. There is also a prompt for the number of Siamese lines used (defaults to 1).

[ FRICTION LOSS ]: calculates the friction loss of a hose lay given the hose size and length. The loss is shown in psi.

(FLOW RATE) [ STRAIGHT TIP ] or [ FOG NOZZLE ]: Find the flow rate of water through the hose when it is a straight bore tip or fog nozzle in GPM (gallons per minute), respectively. For the fog nozzle, the rated nozzle pressure is skipped (the manual has it prompted).

(REACTION FORCE) [ STRAIGHT TIP ] or [ FOG NOZZLE ]: Find the reaction force in Lbs (pounds fource) of water through the hose when it is a straight bore tip or fog nozzle, respectively.

[ APPLIC. RATE ]: Find the minimum rate of water, in GPM, that is required to extinguish a fire given the rooms’ length, width, and height in feet.

[ RATE OF FLOW ]: I did not see this calculation the manual, but given from the prompts, this calculates the rate of flow of water given the following parameters: nozzle pressure, English pressure, hose size, number of Siamese lines used, number of floors, and hose length.









Because the number of solvers don’t match the manual exactly, I think this model either predates or succeeds the model described in the manual. On the back of the project it states “Cygnus of South Florida Electric Calculator. Project No. 302”. Does that mean anything?



Manual


Manual to the FireCalc from Akron Brass Company, written in 2008. It’s not the exact module that I have, but it’s pretty close: https://smhttp-ssl-61500.nexcesscdn.net/media/pdf/9900_FireCalcInstructions.pdf



Until next time, be safe and wishing you happiness (and safety from fires),



Eddie


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

Spotlight: Casio DF-320TM

Spotlight: Casio DF-320TM



Just the Facts


Model: DF-320TM

Company: Casio

Type: Desktop

Number of Digits: 12

Display: 3 lines

Power: Solar plus backup battery, LR 44

Years of Production: My guess is somewhere in the 2000s




Sales tax calculation

Exchange rate calculation

Time calculation example



Several months ago, I found this calculator at a thrift shop in Montclair, California for a $1.35 (after discount). The DF-320TM is a nice desktop calculator with three lines. The top two lines are used for specific purposes, while the bottom on line has general calculation and results on the third line.



Features


The features of the DF-320 TM include:

* 12 digit display. For those of us working with large numbers, the extra digits are nice.

* Two slide settings that are found on desktop calculators: rounding and the fixed decimal settings. Add mode is available for those who are proficient with adding machines or those who like working with dollars and cents without having to enter the decimal point.

* Cost/Sell/Markup calculation

* Sales tax and discount

* Exchange rate calculations between two currencies

* An [ H/M/S ] button which allows for hours-minutes-seconds calculation.

* Tracking of grand total every time when the equals key ( [ = ] ) is pressed. The grand total is retrieved by pressing the [ GT ] key.

* Determining change with the [ CHANGE CAL ] button.



All examples have the following setting: 5/4 rounding fixed to 2 decimal places.



Cost/Sell/Markup


The three keys, [ COST ], [ SELL ], and [ MAR ] (MAR for Markup) solve cost-sell-markup problems. Entries are made on the top screen and solving for the third variable occurs automatically.


Example:

1200 [ COST ] 12 [ MAR ]


Display:

COST> 1,200.00

MAR> 12.00%

= 1,363.64 (selling price)


Setting Tax and Exchange Rates


The DF-320TM employs the traditional way to set tax rate and currency exchange rate.


1. Start by pressing and holding [ AC ] and [ % ] until the screen reappears with the SET indicator.


2a. For the tax rate: Press [ TAX+ ], enter the tax rate, then press the [ % ]/

2b. For the currency rate: Press [ C2/EX RATE ]. Symbols such as $, €, £, A, B appear on the top left hand display as such: £ → $. Cycle through the symbols by pressing the [ + ] (↓RATES) key. Type in the rate and press [ % ]. You can view the rates going both ways by pressing the [ - ] key in this mode.


3. Press [ AC ] to return to normal calculator mode.



Example: $1 is converted to € 0.9027


Hold [ AC ] and [ % ] until SET appears. Press [ C2 ]. Press [ + ] until $ → € appears.

Enter 0.9027 and press [ AC ]. In this setting $ belongs to C1 and € belongs to C2.


$15 converted to Euros: 15 [ C2 ]. Display:


$ 15

RATE > 0.9027

€ 13.54


€200 to U.S. Dollars: 200 [ C1 ]. Display:


€ 200

RATE > 1.10778774786

$ 221.56


The three line display in used in a similar structure with tax calculations.



Change Calculation


The [ CHANGE CAL ] is used for change calculations, after a calculation is completed with the equals key [ = ]. I discovered this function by accident because the manuals I could find online did not give a thorough description of the function.


< calculation > [ = ] amount [ CHANGE CAL ]


Example 1:


Three items are priced 13.84, 17.01, and 19.99 are purchased. Assume that sales taxes are included in the price. You gave the cashier 100.


[ AC ] 13.84 [ + ] 17.01 [ + ] 19.99 [ = ]

Display:

GT = 50.84


100 [ CHANGE CAL ]

Display:

PRICE> 50.84

PAYMENT> 100.00

GT = 49.16

(Change: 49.16)


Example 2:


Three items are priced 11.95, 9.95, and 31.85. Sales tax is 9%. You give the cashier 100.


Press [ AC ] and [ % ] until SET appears. [ TAX + ] 9 [ % ]

[ AC ] 11.95 [ + ] 9.95 [ + ] 31. 85 [ = ]

Display:

GT 53.75


[ TAX+ ]

Display:

TAX 4.84

9%

T + GT 58.59


[ = ]

Display:

GT 58.59


100 [ CHANGE CAL ]

Display:

PRICE> 58.59

PAYMENT> 100.00

GT = 41.41

(Change: 41.41)


That is the Casio DF-320 TM in a nutshell. I understand that several calculators with the change calculation are or were sold in Asia, if memory serves me correctly.


Until next time,


Eddie


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


Monday, November 11, 2024

Spotlight: TI-55 from 1977

Spotlight: TI-55 from 1977


TI-55 with pouch and AC adapter


Welcome to a special Monday Edition of Eddie’s Math and Calculator Blog.


Today, we have the original TI-55! Thankfully, I have the AC-adapter.



Quick Facts



Model: TI-55

Company: Texas Instruments

Timeline: 1977- 1979

Type: Scientific, Programmable

Memory: 32 programming steps, 10 memory registers

Power: AC adapter, 2 “AA” NiCd rechargeable batteries



TI-55, plugged in and working




Timeline of the TI-55


The original TI-55 was released in 1977 by Texas Instruments. It is the most basic programmable calculator in Texas Instrument’s line during the late 1970s, which the product line includes the TI-57 (Radio Shack EC-4000) and TI-58/58C/59.


The TI-55 was later updated in the 1980s twice. The TI-55 II was released in 1981. The good news of the update: memory increased to 56 steps, the sign, absolute value, fraction part, integer part functions, and numerical integration were added. Bad news, a crummy, unworkable keyboard! The keyboard was corrected with the TI-55 III in 1986. Even though it would be unofficial, I would consider the final version to be the TI-60 (no suffix) that would last from 1988 into the early 1990s.



Features and Keyboard


* Trigonometry

* Hyperbolic Trigonometry

* Logarithms, Anti-logarithms

* 8 sets of conversions: in/mm, gal/L, lb/kg, °F/°C, degrees/grads, grads/radians, degrees-minutes-seconds (DMS)/decimal degrees, polar/rectangular, all marked in blue font.

* Linear regression

* Storage Arithmetic

* Constant function for repeated calculation by pressing [ 2nd ] (Const). On later TI calculators, such as the TI-30Xa, this would be labeled as K.

* Simple programming up to 32 steps


The [ 2nd ] (CA) (marked in green): clears everything, including programs and registers.


The keyboard of the unit I bought is clean and all of the keys respond well. Knock on wood it stays that way.



Storage Arithmetic


The TI-55 has 10 memory registers, registers are numbered 0 to 9. Register arithmetic works as follows:


[ STO ] n: stores the number to register n

[ SUM ] n: adds the number to register n (STO+)

[ INV ] [ SUM ] n: subtracts the number from register n (STO-)

[ 2nd ] (Prod) n: multiplies the number to register n (STO×)

[ INV ] [ 2nd ] (Prod) n: divides the number by register n (STO÷)

[ 2nd ] (Exc) n: exchanges the number with the contents in register n (x<>n)


Memory registers 0 and 1 are free to use, but the rest of them can be affected depending on what mode the calculator is in.



Conversions


There are eight sets of conversions that are marked in light blue on the calculator marked in this format: a ⋅ b


Pressing [ 2nd ] before the key performs the conversion from a to b (left to right, →).

Pressing [ INV ] [ 2nd ] before the key performs the conversion from b to a (right to left, ←).


Example:

[ 2nd ] [ 4 ] (in ⋅ mm): convert from inches (in) to millimeters (mm)

[ INV ] [ 2nd ] [ 4 ] (in ⋅ mm): convert from millimeters (mm) to inches (in)


Polar-Rectangular Conversions:

To Rectangular: r [ x<>y ] θ [ 2nd ] (P ⋅ R): y [ x<>y ] x

To Polar: x [ x<>y ] y [ INV ] [ 2nd ] (P ⋅ R): θ [ x<>y ] r



Statistics and Linear Regression


In single variable statistics, the y variable is used instead of the customary x. The one-variable results are:


[ 2nd ] (S. Dev): sy (sample deviation)

[ 2nd ] (Mean): y-bar (arithmetic mean)

[ 2nd ] (Var): σy^2 (population variance)

[ RCL ] [ 5 ]: Σy

[ RCL ] [ 6 ]: Σy^2

[ RCL ] [ 7 ]: n


For linear regression (y = a * x + b), enter the x data point first, press [ x<>y ], enter the y point, finally press [ Σ+ ]. The [ 2nd ] (Σ-) is used to erase points. Since statistics is accumulated in registers, we can enter as many points as we like.


[ 2nd ] (Corr): correlation (r)

[ 2nd ] (Slope): slope (a)

[ 2nd ] (Intcp): y-intercept (b)

Predict with x’ and y’.


The TI-55 working primarily with the y variable carries over into linear regression mode too:

[ 2nd ] (S. Dev): sy (sample deviation)

[ INV ] [ 2nd ] (S. Dev): sx (sample deviation)

[ 2nd ] (Mean): y-bar (arithmetic mean)

[ INV ] [ 2nd ] (Mean): x-bar (arithmetic mean)

[ 2nd ] (Var): σy^2 (population variance)

[ INV ] [ 2nd ] (Var): σx^2 (population variance)

[ RCL ] [ 2 ]: Σx

[ RCL ] [ 3 ]: Σx^2

[ RCL ] [ 4 ]: Σxy

[ RCL ] [ 5 ]: Σy

[ RCL ] [ 6 ]: Σy^2

[ RCL ] [ 7 ]: n


The TI-55 has a feature called automatic line trend entry. That is we can enter data points as:

(n, y1)
(n + 1, y2)

(n + 2, y3)

and so on.


Start with entering n [ x<>y ] y1 [ Σ+ ]. Then just enter the rest of the y-data: y2 [ Σ+ ], y3 [ Σ+ ], and so on. The x values n + 1, n + 2, etc. are entered automatically. It sounds like a nice, convenient, possibly underrated feature that is worth exploring. I think this also works on the TI-57, TI-58/58C/59, and TI-66, but please don’t quote me on it.



Keystroke Programming


The TI-55 has basic algebraic programming, which can hold up to 32 steps (step numbers 00 to 31). The programming module is basic: no loops as far as goto/labels, no prompts, and no comparisons (although some tests can be used using backdoor methods such as 1/0).

There are only four commands:


[ 2nd ] (R/S): Run-Stop

[ 2nd ] (Rst): Reset, go to step 00 and continue execution.

[ 2nd ] (Lrn): This sequence is the toggle between learn (program) mode and calculator mode.

[ 2nd ] (Sst): Single Step through the program.


The TI-55 is in program mode when the display is in the format: SS RC.

SS: step number

RC: key code. R is the row number coming from the top down, C is the column code is the column going left to right. The left most column: C = 1 (unshifted), C = 6 (shifted). Right most column: C = 5 (unshifted), C = 0 (shifted).


There are couple of exceptions:


Pressing [ 2nd ] adds 5 to the column number. For example, [ % ] has the code 22, while the [ 2nd ] (Δ%) sequence has the code 27. The steps with the [ 2nd ] key are merged, while the [ INV ] key (key code 21) is not.


Pressing a number key gives RC in the format 0#. The [ 9 ] gives the key code 09.


SS represents the current step you are on. 05 00 means that you are on step 5 and nothing has been entered. To review codes, we must use Rst (reset) and Sst (single step).


A sample program: f(x) = x^2 + 1.


32

x^2

75

+

01

1

85

=

86

R/S

87

Rst



Hidden Secrets


The TI-55 has hidden key codes, which I have yet to explore, but here is an article from rskey.org:

https://www.rskey.org/CMS/the-library/?view=article&id=98




Source


Woerner, Joerg. “Texas Instruments TI-55” Datamath. December 5, 2001. Retrieved November 11, 2024. http://www.datamath.org/Sci/MAJESTIC/TI-55.htm


Manual: http://www.datamath.net/Manuals/TI-55_US.pdf


To those in the United States, Happy Veteran’s Day! Gratitude, take care, and be safe,



Eddie


All original content copyright, © 2011-2024. 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 84 Plus CE: Consolidated Debts

TI 84 Plus CE: Consolidated Debts   Disclaimer: This blog is for informational and academic purposes only. Financial decisions are your ...