Saturday, July 31, 2021

HP 48G: Truth Plots

HP 48G: Truth Plots





Calculators Featured:  HP 48G, HP 48G+, HP 48GX


Truth Plots


On the HP 48G, a truth plot tests an inequality or equality for each point of a Cartesian grid.   If the statement is true, the pixel is plotted.  If not, the pixel remains unchanged.  Since each pixel is being tested, a truth plot does take some time to plot.  


Example: The inequality x + y ≤ 2, plots a pixel every time inequality is true.


To access a truth plot on the HP 48G:


1.  Press [ right shift ], [ 8 ] (PLOT).  

2.  The expression is stored in EQ.  Default:  X is the independent variable and Y is the dependent variable.  

3.  Make any necessary adjustments.  If you have to reset your parameters, press [ left shift ], [ 8 ] (PLOT), (PPAR), (RESET).


Truth plots are not unique to the HP 48G series: the current HP Prime can easily and quickly execute truth plots.  The truth plots are renamed "Advanced Graphing App".


Here are examples of truth plots, with the HP 48GX is one the left, the HP Prime is on the right.  The window is set up as x = [-5, 5] and y = [-5,5 ]. 


x^2 + y^2 ≥ 5




(x^3 - y^2) mod 5 ≥ 3




sin(x*y) < 3*cos(x*y)

Radians angle mode is used


Eddie


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

Casio fx-5800P and TI-84 Plus CE: Simplify Radicals and August TI-95 ProCalc Month

Casio fx-5800P and TI-84 Plus CE: Simplify Radicals and August TI-95 ProCalc Month


Introduction

The program SIMPRAD simplifies radicals of any positive integer and power.

Casio fx-5800P Program: SIMPRAD

"2021-05-16 EWS"
"x(N)->A x(B)"
"INTEGERS"
"X"?->X
"N"?->N
Xx(N)->R
If Frac(R)=0
Then R
Stop
IfEnd
Int(R)->Q
N->B
1->A
While Q1
B÷(Q^(X))->S
If Frac(S)=0
Then Q×A->A
S->B
IfEnd
Q-1->Q
WhileEnd
"A x(B):"
A
B

TI-84 Plus CE Program:  SIMPRAD


Or type: 

"2021-05-16 EWS"
ClrHome
Disp "√(N)->A*x√(B)","ENTER INTEGERS"
Input "X? ",X
Input "N? ",N
Xx√N→R
If fPart(R)=0
Then
Disp R
Stop
End
iPart(R)→Q
N→B
1→A
While Q≠1
B/(Q^X)→S
If fPart(S)=0
Then
Q*A→A
S→B
End
Q-1→Q
End
Disp toString(X)+"x√("+toString(N)+")="
Disp toString(A)+"*"+toString(X)+"x√("+toString(B)+")"

Examples 




TI-95 ProCalc Month:  August 2021




Every Saturday in August 2021 (8/7/21, 8/14/21, 8/21/21, 8/28/21) will feature the Texas Instruments TI-95 ProCalc from the late 1980s.   


Eddie

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

HP 48G: Multiple Equation Solver and The Equation Library

HP 48G: Multiple Equation Solver and The Equation Library 





Calculators Featured:  HP 48G, HP 48G+, HP 48GX


The Equation Solver


Any program in the HP 48G family, we can set up the calculator to solve a set of equations.  The commands involved:


STEQ:  Store a list of equations in the variable EQ.  The variable EQ is used in the solver.


MINIT:  This command initializes the solver.  The system variable MPAR is created.


MITM:  This optional command allows the solver to have a custom title and arrange the variables in a custom order.  Arguments:  2:  title string, 1:  the list of variables.  The list can have a blank string, " ".  All the variables must be included.  


MSOLVR:  Starts the solver.


In the solver:


( var ):  store

[ left shift ] ( var ):  solve

[ right shift ] ( var ):  recall


An RPL Template:


<< ... 

{ list of equations }  STEQ MINIT

"title" { list of variables } MITM

MSOLVR

... >>


HP 48G Program:  HCURVE


<<  DEG

'T=R*TAN(Δ/2)'

'L=R*Δ*π/180'

'C=2*R*SIN(Δ/2)'

3 →LIST STEQ MINIT

"Horizontal Curve"

{ Δ R T L C } MITM

MSOLVR >>


Variables:


Δ = central angle (in degrees)

R = central radius

T = tangent length

L = arc length of the horizontal curve

C = chord length


One of Δ or R must be known.  When Δ and R are both entered or solved for, L, T, and C can be solved for.


Example 1:


Inputs:

Δ: 45

R: 100


Outputs:

T = 41.4213562373

L = 78.5398163398

C = 76.536686473


Example 2:


Inputs:

L:  1706

Δ: 54


Outputs:

R = 181.012221943

T = 2.2303337494

C = 164.35658198


The Equation Library


The equation library can be accessed by pressing [ right shift ] [ 3 ].  A list of various subjects are listed.  Options:


[ F1 ] (SI):  SI units are used

[ F2 ] (ENGL):  English units are used

[ F3 ] (UNIT): turn units on and off


Once a topic is selected, another menu s presented where all the equations are contained.  Depending on the topic, one or more equations are selected.  When ready, select (SOLV).  


Example 1:  Triangle


Plane Geometry -> Triangle -> Equation 2 of 6


A=(b*h)/2

P=b+√(v^2+h^2)+√((b-v)^2+h^2)





Example:  (default SI units are used)


Inputs:

P: 100 cm

b: 40 cm

h: 35 cm


Outputs:

V = 20 cm

A = 700 cm^2


Example 2:  Longitude Waves


Waves -> Longitudinal Waves -> Equation 1 for 4


s = sm cos( k * x - ω * t )

v = λ * f

k = 2 * π / λ

ω = 2 * π * f


Example:  (default SI units are used)


Inputs:

λ: 0.2264 cm

f: 1400 Hz

t: 15 s

sm: 1.5 cm


Outputs: 

v = 314.44 m/s

k = 0.279750013677 r/cm

ω = 8976.45943005 r/s


Eddie


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

Review: TI-84 Plus CE Python

 Review:  TI-84 Plus CE Python


From the looks of the packaging, the CE Python edition is set to replace the non-Python CE.


Python Comes to the TI-84 CE Python

The TI-84 Plus CE Python has started to arrive in the United States.  I was able to purchase a TI-84 Plus CE Python calculator at a local Target (I'm in the greater Los Angeles area).   At the time, Target had three colors:  blue, red, and white.  Since I already have a blue TI-84 Plus CE ("plain", but M hardware revision), I purchased a white calculator.  I was able to get the Python at a price of what the original CE sells for.  Prices vary around $100 to $150, so shop for the back to school sales and discounts.  

The TI-84 Plus CE Python is the TI-84 Plus CE but with the chip added so that the calculator can run Python programs.  You get all the features of the original TI-84 Plus CE, along with all the standard apps (Finance, CabriJr, CelSheet, Conics, PlySmlt2, etc).  However, there is a slight difference in memory:

TI-84 Plus CE:   154,000 bytes RAM, 3MB bytes ROM
TI-84 Plus CE Python:  149,000 bytes RAM, 3MB bytes ROM

It's still plenty of room to work.  

The TI-84 Plus CE Python comes with OS 5.6 installed.  Hence, ASM (assembly) programming is not supported unless a hack is applied to it.  

This review will focus on the Python part, for the rest, please see my review of the original TI-84 Plus CE here, way back in May 2015:

Python



The TI-84 Plus CE Python runs Micropython.  There are several standard modules: math, random, and time, with TI's custom modules:  ti_system, ti_plotlib (graphing), ti_hub (TI Basic programming also gets hub commands), and ti_rover.

I like the menu structure, with most of the commands giving the syntax of each command.   I had a much easier time selecting the commands from the Fns... menu than typing them myself.   For several commands, once they are selected from the Fns... menus, we get a secondary prompt to choose a attribute.  

Examples:  

(1) plt.axes gives a choice of turning them On and Off.   

(2) plt.plot gives a prompt of four possible markers.

Calling commands from Fns... menus pastes the parenthesis and brackets.

Context menus are also available through the [ math ], ( list ), and the trig keys ([ sin ], [ cos ], [ tan ]).  More can be discovered.  In Python, both the [(-)] and [ - ] keys can be used to enter negative numbers.

What is going to take me some time to get used to is the way the [ alpha ] key operates in the Python app.  The [ alpha ] toggles from lower case (default) and upper case.   I can still use the [ 2nd ] [ alpha ] combination to enter alpha-lock but I will also need to use the [ 2nd ] [ alpha ] sequence to exit alpha-lock.  

To either delete or send Python files to archive, press [ 2nd ] [ mem ] [ 2 ] [ alpha ] [ apps ] (B), not listed in the Prgm (program) variables.   Python scripts are counted as App (application) variables (AppVars).  

I find the Python app easy to use.

Below are some sample scripts, which you can download here:

The zip file contains:
LISTDEMO:  demonstration of lists
CMPXARIT:  arithmetic with complex numbers
PLOTFX84:  simple plot of y(x) 

Remember, these are application variables (AppVar Python), not program files.   They are not (as of this blog date) able to be edited on the TI Connect CE software. 

Still Wishing

Still waiting for base conversions, vectors functions (cross, dot, norm, angle between vectors), allowing the days between dates allow for four digit years (the current limits are 1980-2079), complex numbers to be allowed in trigonometric, exponential, and logarithm functions.  Maybe in OS 6.x, fingers crossed, putting it out there in the Universe.  


Eddie

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

TI-84 Plus CE: Rolling Fate Dice

 TI-84 Plus CE: Rolling Fate Dice 



Fate Dice:  Evil Hat Productions

Website:  https://www.evilhat.com/home/fate-dice/


Roll Your Fate!


Fate Dice, a fudge dice, are used in many role-playing games.  The dice pictured above is just one variety of fudge dice used.   These Fate Dice are four six-sided dice consisting of two pluses, two blanks, and two minuses on each die.


Therefore, on a single roll of a die, the roller has 1/3 chance of getting a plus, blank, or minus on each roll.  The program FATEDICE below takes this account and uses a random number generator between -1 (for minus), 0 (for blank), and 1 (for plus).  The program draws the result of the four dice on the graphic screen.   


The resulting graphic screen has the following parameters:


* All functions and plots turned off.

* All drawing is cleared.

* Xmin = 0, Xmax = 13, Xscl = 1 (x scale)

* Ymin = 0, Ymax = 7,  Yscl = 1 (y scale)


 TI-84 Plus CE Program:  ROLLFATE

Version 5.x or higher required (Wait command)


"EWS 2021-05-15"

ClrHome

Disp "FATE DICE"

FnOff 

PlotsOff 

randInt(­1,1,4)→L₆

Disp "ROLLING..."

Wait .5

ClrDraw

0→Xmin:13→Xmax:1→Xscl

0→Ymin:7→Ymax:1→Yscl

For(I,1,10,3)

(I+2)/3→J

Line(I,3,I+2,3,NAVY)

Line(I,1,I+2,1,NAVY)

Line(I,3,I,1,NAVY)

Line(I+2,3,I+2,1,NAVY)

If abs(L₆(J))=1

Line(I+.5,2,I+1.5,2,GREEN)

If L₆(J)=1

Line(I+1,2.5,I+1,1.5,GREEN)

End

TextColor(BLUE)

Text(10,10,"HERE IS YOUR ROLL:")



Eddie


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

HP 48G: Business Applications

 HP 48G:  Business Applications


Calculators Featured:  HP 48G, HP 48G+, HP 48GX

Percent Addition 

HP 48G Program: %PLUS

<< OVER SWAP % + >>

Stack:
2:  amount
1:  percent

Example 1:   150 + 17%

150 [ ENTER ] 17 (%PLUS) 
Result:  175.5

To subtract, make the percent negative.

Example 2:  170 - 18%

180 [ ENTER ] 18 [ +/- ] (%PLUS)
Result:  139.4

Interest Rate Conversion to APR

The program →APR converts a nominal interest rate (NOM) to the effective interest rate (APR/EFF) given the rate and the compound periods per year.

HP 48G Program:  →APR

<< "→APR"
{ { "I%YR:" } { "PYR:" } }
{ } { } { }
IF INFORM 
THEN OBJ→ DROP
SWAP 1 % OVER / 1 +
SWAP ^ 1 -  100 * 
"APR" →TAG END >>

Example   

nominal rate: 7.5%, periods per year: 6

Result:  
APR: 7.738318055 (%)

Source:
Thomsett, Michael C.  The Real Estate Investor's Pocket Calculator 2nd Ed.  American Management Association: New York.  2017

Present Value of a Growing Payment

The program PVGROW calculates the present value of a growing annuity.   Each payment grows by the rate g% while the discount rate is r%.

PV_grow = PMT_base / (R% - G%) * (1 - (1 +G%) / (1 + R%) ^ n )


HP 48G Program:  PVGROW

<< "PV GROWING ANNUITY"
{ { "1st Pmt:" } { "I/YR:" } { "Growth Rate:" } { "N: "} }
{ } { } { } 
IF INFORM
THEN OBJ→ DROP 4
ROLLD 1 % SWAP 1 %
SWAP - LASTARG 1 + 
SWAP 1 + / 4 ROLL 6
1 SWAP - 3 ROLLD /
* "PV" →TAG END >>

Example

1ST PMT:  1000.00
I/YR:  3.5 (%)
GROWTH RATE:  4 (%)
N: 36

Result:  
PV:  37890.784118

Source:
"Present Value of a Growing Annuity" financeformulas.net  https://financeformulas.net/Present_Value_of_Growing_Annuity.html   Retrieved December 13, 2020.  


Interest Only Loan

The program INTONLY calculates payments from:

Interest-only payment
Payment (P&I) when the principal starts being due

HP 48G Program:  INTONLY

<< "INTEREST ONLY"
{ { "LOAN:" } { "I/YR:" } { "INT YRS:" } { "MAIN YRS:" } }
{ } { } { }
IF INFORM 
THEN OBJ→ DROP 12
* 'N' STO ROT DUP
'PV' STO ROT DUP
'I%YR' STO 1 % * 12
/ NEG 'IMPT' DUP2 
STO →TAG SWAP DROP
0 'FV' STO 12 'PYR'
STO 'PMT' TVMROOT
'PMT' →TAG END >>

Example

LOAN:  185000.00
I/YR:   4.55 (%)
INT YRS:  5
MAIN YRS: 30

Results:

IMPT: -701.4583333333   ($701.46 each month for the first 5 years)
PMT: -942.871969103   ($942.87 each month for the rest of the 30 years)

Source:
Kapfidze, Tendayi  "What Is an Interest-Only Mortgage and How Does It Work?"  Edited by Deborah Kearns  LendingTree.  LendingTree, LLC, Charlotte, NC:  2021.   https://www.lendingtree.com/home/mortgage/interest-only-mortgages/  Retrieved March 9, 2021


Eddie

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

Review: Calculated Industries ConcreteCalc Pro (4225)

Review:  Calculated Industries ConcreteCalc Pro (4225)









Quick Facts


Model Number:  4225

Company:  Calculated Industries

Year of Production:  2010 - present

Operating System:  Chain

Batteries: 1 x CR 2016

Memory Register:  1 independent (M), memories M1 - M3

Paperless Tape:  20 steps, arithmetic functions are recorded

Cost:  Retail:  $74.95, but selling prices vary.  I purchased mine used for $30 on eBay.


Product Page:

https://www.calculated.com/mobile/prd104/ConcreteCalc-Pro-4225-Concrete-Calculator.html


Consistent my recent reviews of Calculated Industries calculators, including the Pipe Trades Pro and the ElectricCalc Pro, I am impressed by the keyboard and the feel of the keys, love the Armadillo Gear case cover, and the calculator serves specific purpose and industry.  


Highlighted Features


Here are some, just some, of the features of ConcreteCalc Pro:  


Dimensional Math:  Calculations and conversions with units, both US and Metric, are available on the ConcreteCalc Pro.


Areas and Volumes:   The [ Length ], [ Width ], and [ Height ] keys serve as the entry keys to calculate area and volume.  


VOL = volume of the room

WALL = area of the one of the four walls

ROOM = total surface area of the walls


The results are accessed through repeated presses of the [ Height ] key.  


Geometry:  The ConcreteCalc Pro also works with calculating areas and circumferences of circles, volumes of cylinders and cones, and arc lengths.  Regular polygons are also included.  


Example:  6-sided polygon with radius of 5 in.  

5 [ Inch ] [ Conv ] [ Arc ] (Radius)

6 [ Conv ] [ Length ] (Polygon)

FULL:  120.00°

HALF:  60.00°

SIDE:  6

PER:  30 in (perimeter)

AREA:  64.95191 in^2  (area)


Loads, Blocks, Bags:  Calculate loads and bags of concrete based on volume, and the number of blocks based on area and the size of the blocks.


Stairs:  Use the [ Height ] key to store the total floor-to-floor rise, desired riser height, floor height, and tread width and you can get the run, incline of the stairs, the length of the stringer and more with the [ Stair ] key.  With the Riser Limited option, we can calculate these statistics restricting the desired the riser height as the maximum.  


Rebar calculations 



Eddie


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

Calculated Industries Qualifier Plus IIX and HP 12C: Maximum Loan Amount and Allowable Payment

Calculated Industries Qualifier Plus IIX and HP 12C:  Maximum Loan Amount and Allowable Payment


Introduction


Given the following:


*  term of the loan, in years

*  the amount mortgage

*  annual interest rate

*  monthly expenses including property tax and mortgage interest


The following are calculated:


*  payment, including PITI

*  minimum required income

*  maximum allowable (other) debt


Assumptions:


*  The standard 28:36 ratio is used (28% for PITI, 36% for PITI and other monthly debts)

*  Payments are made at the end of each month


Both of the above parameters are can be changed but the program uses these assumptions.


Formulas (as determined by verifying examples):


PITI =  PMT + monthly property insurance + monthly property tax


Minimum Required Income:

RI = (PITI * 12) / 0.28 


Maximum Allowable (Other Debt): (uses RI from Required Income)

MA = (RI * 0.36) / 12 - PITI


Calculated Industries Qualifier Plus IIx:  Key Strokes


Note:  The IIx is a predecessor of the Qualifier Plus IIIx, however I believe the key strokes should be the same.  


Inputs:

annual interest [ Int ]

number of years [ Term ]

amount to be financed [ L/A ]   ([Loan Amt] on the IIIx)

annual property tax [ Tax ]

annual property insurance [ Ins ]


Alternate to amount to be financed:

total price [ Price ],  down payment as a percent of the price [ Dn Pmt ]


Output:

[ Pmt ] to display payment

[ Pmt ] again to display PITI

[ Qual 1 ] to display the required minimum income

[ Qual 1 ] again to display the maximum allowable (other) debt


HP 12C: Program


Input Instructions: 

annual interest [ g ] (12÷)

number of years [ g ] (12×)

amount to be financed [ PV ]   

0 [ FV ]

monthly combined property tax and insurance [ R/S ]


Alternate:  

annual property tax [ ENTER ] annual property insurance [ + ] 12 [ ÷ ] [ R/S ]


Output:

to display payment

[ R/S ] again to display PITI

[ R/S ] again to display the required minimum income

[ R/S ] again to display the maximum allowable (other) debt



Step # :  Key Code:  Key

01 : 44,0         :    STO 0

02 : 14         :        PMT

03 : 14         :        PMT

04 : 31         :        R/S

05 : 45, 0 : RCL 0

06 : 16         : CHS

07 : 40         : +

08 : 44, 1 : STO 1

09 : 31         : R/S

10 : 48         : .

11 : 2         : 2

12 : 8         : 8

13 : 10         : ÷

14 : 44,3         : STO 3

15 : 1         : 1

16 : 2         : 2

17 : 16         : CHS

18 : 20         : ×

19 : 44,2         : STO 2

20 : 31         : R/S

21 : 45,3         : RCL 3

22 : 16         : CHS

23 : 3         : 3

24 : 6         : 6

25 : 25         : %

26 : 45,1         : RCL 1

27 : 40         : +

28 : 44,3         : STO 3

29 : 43,33,00 : GTO 00


Examples


Example 1:

annual interest:  4.7%

number of years: 30

amount to be financed:  305,000.00

annual property tax: 0.00

annual property insurance: 0.00


Results:

payment:  1,581.85

PITI:  1,581.85

required minimum income:  67,793.37

maximum allowable (other) debt: 451.96


Example 2:

annual interest:  5%

number of years: 30

amount to be financed:  235,000.00

annual property tax: 1,000.00

annual property insurance: 105.00

(monthly combined tax and insurance:  92.08)



Results:

payment:  1,261.53

PITI:  1,353.61

required minimum income:  58,012.03

maximum allowable (other) debt: 386.75


Eddie


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

HP 48G: Scientific Applications

HP 48G:   Scientific Applications



Calculators Featured:  HP 48G, HP 48G+, HP 48GX


Theoretic Freezing Level


The program FRZLVL calculates the theoretical freezing level in feet above sea level given the outside temperature at a given altitude.  The results are displayed in feet (the feet unit is attached).  


HP 48G Program: FRZLVL


<< "FREEZING LEVEL"

{ { "ALT:" "DEFAULT FT" }

{ "TEMP:" "DEFAULT °C" } }

{ }  { }  { }  

IF INFORM

THEN OBJ→ DROP DUP TYPE

IF 13 == THEN '1_°C' CONVERT

ELSE '1_°C' →UNIT 

END SWAP DUP TYPE 

IF 13 == THEN '1_ft' CONVERT

ELSE '1_ft' →UNIT

END SWAP '1000_ft/°C' 

* DUP2 2 / +

"DRY" →TAG 3 ROLLD

1.5 / + "WET" →TAG END >>


Instructions


1.  Run FRZLVL

2.  ALT:  Enter altitude.  You can attach units if you want, the default is altitude is in feet.

3.  TEMP:  Enter outside air temperature.  You can attach units if you want, the default unit is degrees Celsius (°C).

4.  Results: freezing dry level in feet and freezing wet level in feet.  


Example


Altitude:  1,750 ft

Temperature:  -2°C  (28.4°F)


Results:

DRY:  750_ft

WET:  416.666666667_ft


Source:

Hewlett Packard  "Predicting Freezing Levels" HP 65 Aviation Pac 1.  Hewlett Packard.  1974


Lens Calculations 





Variables


Please note the inequality restrictions.  


R = radius of curvature

D = diameter of the lens, D ≤ 2*R

S = sag S ≤ R

θ =  tangent angle between lens axis and reflection 


HP 48G Program: LENSANG


<< 'R=(D^2+4*S^2)/(8*S)' STEQ

{ { "R/D" << 'D' STO 'R' STO EQ  'S' 0 ROOT 'S' →TAG >> } 

{ "R/S" << 'S' STO 'R' STO EQ 'D' 0 ROOT 'D' →TAG >> }

{ "D/S" << 'S' STO 'D' STO EQ 'R' 0 ROOT 'R' →TAG >> } 

{ "→θ" << 'D' RCL 'R' RCL 'S' RCL - 2 * / ATAN 'θ' DUP2 STO →TAG >> } }

TMENU >> 


Instructions


1.  Run LENSANG.  A temporary custom menu appears.  

2.  Enter two known amounts and press the appropriate key to store the variables:


If R and D are known:  R [ ENTER ] D [ F1 ] 

If R and S are known:  R [ ENTER ] S [ F2 ]

If D and S are known:  D [ ENTER ] S [ F3 ]


The third variable between R, D, and S is calculated and displayed as a result.


3.  Press [ F4 ] to calculate the angle, θ.  


Results are stored in the variables R, S, D, and θ.


Examples


Known:  R = 5.8, D = 7.6

LENSANG  5.8 [ ENTER ] 7.6  [ F1 ] (R/D)

Result:  S: 1.41821953996

[ F4 ] (θ).  Result:  θ:  40.9327245742


Known:  D = 11, S = 9

LENSANG 11 [ ENTER ] 9 [ F3 ] (D/S)

Result:  R: 6.18055555556

[ F4 ] (θ).  Result:  θ:  -62.8591312297


Source:


Tuchscherer, L.D.  "Lens Calculations - SAG, ANGLE, MIN/MAX" HP 67 Optics  Hewlett Packard.  1978.


Period of a Pendulum


The program PENDULUM calculates the period of a pendulum given two parameters:


ANGLE: the angle that the pendulum swings out.  The angle must be entered in radians.


LENGTH:  The length of the pendulum in meters. 


Unlike most calculations, the program uses an Legendre elliptic integral of the first kind to increase accuracy.  


T = 4 * √(L / g) * ∫( dx / √(1 - k^2 * sin^ x), x, 0, π/2) where k = sin(α/2)


g = Earth's gravitational constant = 9.80665 m/s^2


This program does not use units.  


HP 48G Program: PENDULUM


<< RAD 

"PENDULUM"

{ { "ANGLE:" "IN RADIANS" }

{ "LENGTH:" "IN METRES" } }

{ } { } { } 

IF INFORM

THEN OBJ→ DROP

9.80665 / √ 4 *

SWAP 2 / SIN SQ 0 θ π 2 /

→NUM 3 ROLL 'X' 

SIN SQ * 1 SWAP - √

INV 'X' ∫ →NUM *  

"PERIOD" →TAG END >>


Example


ANGLE:  π/6   (enter this as 'π/6')

LENGTH: 1.5  (m)

Result:  

PERIOD:  2.50011881685 (s)


Source:

Steers, Hugh.  "The Pit & Pendulum"  Datafile.  ISSN 1352-8254.  Handheld and Portable Computer Club.   V29 N1.  January - March 2010


Eddie


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


Calculator Python: Lambda Functions

Calculator Python: Lambda Functions Introduction to Lambda Functions Lambda functions are a quick, one expression, one line, python function...