Monday, May 23, 2022

Retro Review: Radio Shack EC-4026

Retro Review:   Radio Shack EC-4026







Quick Facts:


Model:  EC-4026

Company:  Radio Shack

Equivalent Of:  Casio fx-4500P, Casio fx-4500PA

Years:  1989-1991

Type:  Scientific, Programming

Batteries: 1 x CR-2025

Operating Mode:  Algebraic

Memory Registers: 26 (can be extended to 163 through the Defm command)

Program Steps:  1,103 (minimum of 7)

Number of Digits: 10 (display), 12 (precision)


Features


The Radio Shack EC-4026, a clone of the Casio fx-4500P, has a two line display.  On the top row shows formulas, equations, and prompts; and the bottom row displays results, and line numbers in programming mode.  


The modes of the EC-4026 include:


*  Angle Mode:  Degrees, Radians, Grads

*  Display Mode: Fix, Scientific Notation, Norm, Engineering Notation

*  Programming Write 

*  BASE-N:  base conversions and Boolean Logic.  Binary numbers have 32 bits, signed.

*  Linear Regression:  y = A + Bx

*  Single Variable Regression (SD:  Standard Deviation mode)


Extended Memory


By default, there are 26 memory registers, A-Z.   You can use the square brackets [ ] to refer to memory registers indirectly, with the syntax  letter[# registers from letter].


A[ 0 ]: A

A[ 1 ]: B

A[ 2 ]: C

A[ 3 ]: D

...

Z[ 0 ]:  Z


To extend the number of memory registers, execute [ MODE ] [ Ans ] and enter the number of extended memory registers. For example, Defm 10 extends the number of registers to 36, allowing for registers Z[ 1 ] to Z[ 10 ].


Defm 0 returns he number of registers to the default 26. 


Each extended memory costs 8 programming steps.


Independent Memory


The memory M is considered an independent memory with M+ and M- functions.


Formulas

 

In regular mode, we can store one formula (up to 127 steps) into memory with the IN command.  


Expressions can be entered.  If the expression is entered in the form of var=formula, the result is stored into the variable.   


The best part is that you can make prompts and result markers by adding a quoted comment next the variable.  


Use the OUT command to recall the formula and CALC command to run the calculation.


Example:


A"AREA"=π×R"RADIUS"²  [ IN ]


[ CALC ]

RADIUS?    (8.8)

AREA=     (243.2849351)


Integration


The integral command (∫) calculates the integrals of f(x) using Simpson's Rule.  


∫( f(X), low, high, n) 


n is an optional argument.  If n is included, the calculator uses 2^n partitions.  The maximum amount of partitions is 2^9 (512).   During calculation, the screen goes blank except for mode indicators.


Programming


The programming module is an early version of Casio basic.   Each program can have a file name.  The file names are sorted by chronologically.  In write mode, each line has a file number and a line number. (F# L#).  


Store calculations by using the syntax:


var=expressions


Variables can be either be defined (with their values) or undefined (the program will ask for the values each time a loop returns).   Define all the variables with the Fixm command.   We can undefine variables with the curly brackets { }.


The If structure is a little different, with the following symbols are used:


⇒  Then

≠⇒ Else  ( [ 2ndF ] [ a b/c ] )

◺ EndIf


(condition) ⇒ (do if true) : or ⊿ ≠⇒ (do if false) : or ⊿ ◺ (the if loop ends)


Subroutines, Pause (up to 4.5 seconds, with terms of half-seconds), and Goto/Labels (0-9, specific to each program) are included.  


The manual will also list a way to designate a program file as a data bank of names and their telephone numbers.


Sample programs follow.


Volume of a Frustum of a Cone:


Name:  FRUSTUM.CONE

F# L1  {H,Q,R}      // undefine H, Q, R

F# L2  H"HEIGHT"   // prompt for H with the prompt "HEIGHT?"

F# L3  Q"SMALL R" // prompt for Q with the prompt "SMALL R?"

F# L4  R"BIG R"  // prompt for R with the prompt "BIG R?"

F# L5  V"VOL"=H×(Q²+R²+Q×R)×π/3    // calculate volume, display V with "VOL="


Function Table


Name: TABLE

F# L1  {A,B,C}   // undefine A,B,C

F# L2  A"BEG"  // prompt for A with the prompt "BEG?"

F# L3  B"END" // prompt for B with the prompt "END?"

F# L4  N"POINTS" // prompt for N with the prompt "POINTS?"

F# L5  H=(B-A)/N

F# L6  X=A

F# L7  Lbl 0   // start the table

F# L8  X⊿   // display X

F# L9  F=2X-1⊿  // insert f(x) here (F=f(x))

F# L10  X=X+H

F# L11  X≤B⇒Goto 0:◺"FIN"  // if-then structure


Closing Thoughts


The EC-4026 is a great programming calculator.  The programming structure does present a learning curve due it being a beginning version of Casio basic.   


Sources


"Radio Shack EC-4026"  MyCalcDB.  April 21, 2014.   Last Accessed April 3, 2022.  http://mycalcdb.free.fr/main.php?l=0&id=4059


Toth, Viktor T.  "Casio fx-4500P"  rskey.org   2022.   Last Accessed April 3, 2022.  https://www.rskey.org/fx4500p


Toth, Viktor T. "Radio Shack EC-4026" rskey.org.  2022.  Last Accessed April 3, 2022.  https://www.rskey.org/ec4026


Until next time,


Eddie


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

Converting a Line in Parametric Line to a Function Line

Converting a Line in Parametric Line to a Function Line 


From (x(t), y(t)) to y(x)


Express a line, presented in parametric form:


x = A * t + B

y = C * t + D


where A, B, C, and D are constants, and convert it to function form (y(x) or f(x)).


Here is one way to do this:


x = A * t + B

A * t = x - B

t = x / A - B / A


y = C * (x / A - B / A) + D

y = (C/A) * x - B*C/A + D

y = (C/A) * x + (D - B*C/A)


We know have a function in the slope-intercept form where:


slope = C/A


intercept = D - B*C/A


Casio fx-4000P Program:  Converting Parametric Lines to Functional Line

Size:  77 bytes

(line breaks added for readability)


"X=AT+B; A":

?→A:

"B":

?→B:

"Y=CT+D; C":

?→C:

"D":

?→D:

"SLOPE="⊿

C÷A→M⊿

"ITC="⊿

D-B×M→I


Examples


Graph screens are created by the Numworks emulator:  https://www.numworks.com/simulator/


Example 1:

x = 3 * t  - 4 

y = 2 * t + 8


A = 3, B = -4, C = 2, D = 8


Results:

SLOPE = 0.666666667

ITC = 10.66666667






Example 2:

x = -2 * t + 6

y = 4 * t + 3


A = -2, B = 6, C = 4, D = 3


Results:

SLOPE = -2

ITC = 15





Hope you find this useful.  Take care,


Eddie 


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

Swiss Micros DM41X and HP 41C: Numeric Derivatives

Swiss Micros DM41X and HP 41C:  Numeric Derivatives


Introduction


The program DFX calculates one of three types of derivative:


1.  Normal Derivative   (DX)

2.  Logarithmic Derivative (LN)

3.  Power Derivative (PWR)


Where:


Normal Derivative:  f'(x)


Logarithmic Derivative:  d/dx( ln f(x) ) = f'(x) / f(x)  


Power Derivative:  d/dx( f^n(x) ) = n * f^(n-1)(x) * f'(x),  n doesn't have to be an integer


where f'(x) is estimated by:


f'(x) ≈ ( f(x + h) - f(x) ) / h


Variables:  x, h


The program uses a subroutine FX, see the examples for details.  


DM41X and HP 41C Program:  DFX


Uses program FX as a subroutine as f(x).


01 LBL ^T FX

02 RCL 01

03 ^T X?

04 ARCL 01

05 PROMPT

06 STO 01

07 RCL 02

08 ^T H?

09 ARCL 02

10 PROMPT

11 STO 02

12 RCL 01

13 XEQ ^T FX

14 RCL 03

15 RCL 01

16 RCL 02

17 +

18 XEQ ^T FX

19 RCL 03

20 -

21 RCL 02

22 /

23 STO 04

24 ^T 1 DX 2 LN 3 ↑N

25 PROMPT

26 INT

27 STO 05

28 GTO IND 05


29 LBL 01

30 RCL 04 


31 LBL 02

32 RCL 04

33 RCL 03

34 / 

35 GTO 04


36 LBL 03

37 RCL 03

38 ^T N?

39 PROMPT

40 1

41  - 

42 Y↑X

43 LASTX

44 1

43 +

44 *

45 RCL 04

46 *


50 LBL 04

51 RTN



The function FX:


x is loaded in the X stack register (and on display)


01 LBL ^FX

02  execute f(x)

...

##  RTN


For DFX, do not use R01, R02, R03, R04, and R05 in FX.  


Notes:


Sequences such as:

02 RCL 01

03 ^T X?

04 ARCL 01

05 PROMPT


Puts the prompt as X? [contents of R1].   If you want the previous value, press R/S.  Otherwise enter a new value, then press R/S.


This program uses indirect goto statements.  R05 is used to hold the person's choice and uses it to direct which label is executed.


Examples


Example 1:  f(x) = x * sin x


Set FX as:

01 LBL^T FX

02 RAD

03 ENTER

04 ENTER

05 SIN

06 * 

07 RTN


Setting H to 10^-6  (1E-6):


DF:   f'(x)

x = 0.5, Result:  0.9182; x = 1.6, Result: 0.9530


LN:  ln f'(x)

x = 0.5, Result:  3.8305; x = 1.6, Result:  0.5959


PWR: with n = 3,   (f'(x))^3

x = 0.5; Result:  0.1583; x = 1.6;  Result: 7.3128



Example 2:  f(x) = x^2 + 3 * x + 1 = x * (x + 3) + 1


Set FX as:

01 LBL^T FX

02 ENTER

03 ENTER

04 3

05 +

06 *

07 1

08 + 

09 RTN


Setting H to 10^-6  (1E-6):


DF:   f'(x)

x = 3.2, Result:  9.4000; x = 6.8, Result: 16.6000


LN:  ln f'(x)

x = 3.2, Result:  0.4511; x = 6.8, Result: 0.2454


PWR: with n = 1.5,   (f'(x))^1.5

x = 3.2, Result:  64.3677; x = 6.8, Result: 204.7864



Until next time, 


Eddie


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

Python: Financial Functions (2nd Edition)

Python:  Financial Functions (2nd Edition)


This is an update to the python file, which I first released on May 17, 2020:


https://edspi31415.blogspot.com/2020/05/numworkscasio-micropythonpython.html


I am able to transfer and test the python file to a Numworks calculator through the online editor, and TI-84 Plus CE Python through the TI Connect CE.  Because only the math module is used, the python file can be run in most, if not all calculators with Python, as well as Python 3.  


What is included?


*  time value of money calculations

*  net present value and internal rate of return

*  net present value (xnpv) and internal rate of return (xirr) when periods between flows are not consistent, a 365 day-year is assumed

*  simple interest:  calculating interest, total, and solving for principal

*  profit calculations: cost-sell-markup

*  adding sales tax

*  percent change

*  present and future value uniform stream factors

*  compound interest calculations of a single stream:  solve for present value, future value, number of periods, and periodic interest

*  days between dates

*  specific applications:  monthly payment, PITI, qualifying loan amount, sinking fund, expressing a list of amounts as a percent of the sum, prorating an amount among a list of flows


Download the Python file and the instructions (pdf file) here:

https://drive.google.com/file/d/1l7Xg9dM-RHfekKkU7A1Wjay76-yVc56S/view?usp=sharing


Size: about 3,800 bytes.  


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, May 14, 2022

The Sum and Product of Roots of a Quadratic Equation

The Sum and Product of Roots of a Quadratic Equation


Introduction


Let s, t be the roots of the equation a*x^2 + b*x + c = 0.


Let:


s = (-b + √(b^2 - 4*a*c)) / (2 * a)

t = (-b - √(b^2 - 4*a*c)) / (2 * a)


Then


s + t = -b / a

s * t = c / a


We see this topic a lot in algebra, let's see how these properties are derived. Fairly simple.  


Sum of the Roots


s + t

=  (-b + √(b^2 - 4*a*c)) / (2 * a) + (-b - √(b^2 - 4*a*c)) / (2 * a)

= (-2 * b) / (2 * a)

= -b / a


Product of the Roots


s * t 

=  (-b + √(b^2 - 4*a*c)) / (2 * a) * (-b - √(b^2 - 4*a*c)) / (2 * a)

= (b^2 + b * √(b^2 - 4*a*c) - b * √(b^2 - 4*a*c) - (b^2 - 4*a*c)) / (4*a^2)

= (b^2 - b^2 + 4*a*c) / (4*a^2)

= (4*a*c) / (4*a^2)



Eddie



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

Retro Review: Hewlett Packard HP 45

Retro Review:   Hewlett Packard HP 45





Quick Facts:


Model:  HP 45

Company:  Hewlett Packard

Years:  1973-1976

Type:  Scientific

Batteries: (original) HP Battery Pack 82001A (rechargeable), compatible batteries can be found on eBay, AC Adapter 82002A

Operating Mode:  RPN

Memory Registers: 9 (R1 - R9), some are used in statistics

Undocumented (by the manual) Feature:  Stopwatch

Original Price:  $395.00 (US) 

Package Includes AC Adapter, User Manual, Pocket Guide, Carrying Case 


Features - History


The HP 45 is the second scientific calculator by Hewlett Packard, first brought to the market in 1973; after the legendary HP 35 was released in 1972.  The HP 45 is the second Hewlett Packard calculator to feature a shift key, after HP's first financial calculator, the HP 80.  


The HP 45 operates on Reverse Polar Notation (RPN).   Here is a Wikipedia page on RPN:  https://en.wikipedia.org/wiki/Reverse_Polish_notation


The HP 45 added more functions to the HP 35, which features include:


* trigonometric functions and inverses

* logarithms and antilogs

* powers and roots

* fixed and scientific 

* factorial of integers

* polar/rectangular conversions

* degrees/degree-minute-second conversions (DD.MMSSSS)

* percent and percent change

*  three angle modes: degree, radians, grads 

* Last x

* three unit conversions

* statistics

* storage and recall arithmetic


When the HP 45 is powered on, the calculator will be in FIX 2 mode.  


Factorial of Integers:   The function n! allows only integers from 0 to 69.  It will be later HP calculators to extend the factorial function to the real numbers.


Polar and Rectangular Conversions:  The conversions involve the X and Y stack.  In polar form, X represents r and Y represents θ.


Conversions:  The HP 45 provides conversion factors for unit conversions. Examples provided in FIX 2 mode. 


[ shift ] [ 7 ]: cm/in.   1 in = 2.54 cm.    


18 in to cm:  18 [ shift ] [ 7 ] [ × ] returns 45.72 cm

50 cm to in:  50 [ shift ] [ 7 ] [ ÷ ] returns 19.69 ft


[ shift ] [ 8 ]:  kg/lb.   1 lb ≈ .4536 kg


200 lb to kg:  200 [ shift ] [ 8 ] [ × ] returns 90.72 kg 

66.5 kg to lb:  66.5 [ shift ] [ 8 ] [ ÷ ] returns 146.61 lb


[ shift ] [ 9 ]: ltr/gal.  1 gal ≈ 3.7854 ltr


150 gal to ltr:  150 [ shift ] [ 9 ] [ × ] returns 567.81ltr

690 ltr to gal:  690 [ shift ] [ 9 ] [ ÷ ] returns 182.28 gal


Percent:  The [ % ] key returns x% of y, while leaving the value in the Y stack.  This could be followed up with [ + ] or [ - ] for percent adding and subtracting calculations.  


Add 6% to 150.

150 [ ENTER ] 6 [ % ] [ + ] returns 159.00


Percent Change:  The [ shift ] [ % ] (∆%) calculates percent change:  (y - x)/y * 100 with the value of the Y stack remains. y is old, x is new.


What is the percent change from 35 to 45?

35 [ ENTER ] 45 [ shift ] [ % ] returns 28.57 (%)


The HP 45 has storage and recall arithmetic for the four arithmetic functions (+, -, ×, ÷).  I love storage arithmetic and any time we get recall arithmetic, it's a huge bonus. 


The keyboard feels good and the keys feel responsive.  


Statistics


The HP 45 has one-variable statistics, which some sums for y-data.


R5 = n

R6 = Σx^2

R7 = Σx

R8 = Σy

RCL Σ+ returns Σx to the X stack and Σy to the Y stack

[ shift ] [ R↓ ] returns x-bar to the X stack and sx to the Y stack


Stopwatch


A famous and undocumented feature of the HP 45 is a stopwatch.  The stopwatch is accessed by the sequence [ RCL ] then pressing [ 7 ], [ 8 ], and [ CHS ] keys at the same time.  Done right the display will be in the form:


hh.mm ss     'ss


Press [ CHS ] to start and stop the timer, and any number keys can be used to store the time for lap records.  The stored time will be stored as a decimal and the two two digit exponent will store the hundredths of seconds. 


Pressing [ CLx ] clears the time and [ ENTER ] returns us to the operator mode.  I understand that due to the lack of crystal, the timer is somewhat inaccurate.   


Closing Thoughts


I love this calculator!   It's good to have a calculator from the 1970s, especially from HP.  


Until next time,


Eddie


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

HP 32S and HP 32SII Week: Maximum, Minimum , Histogram

HP 32S and HP 32SII Week:  Maximum, Minimum , Histogram 





Introduction


The program takes data and determines:


*  maximum of the data set (X)

*  minimum of the data set (Y)

*  bin width using Scott's normal rule (h, see formula below)

*  number of bins (k, rounding is not included)


Scott's normal rule:

h = 3.49 * sx / (n^(1/3))


Number of bins:

k = (max - min) / h

In practice, take the ceiling of k.


Instructions


1.  Enter the first data point.

2.  Press XEQ D  (execute label D)

3.  Enter the next data point, press R/S.  Repeat until the last data point.

4.  Press XEQ C 


HP 32S/32SII Program:  Maximum, Minimum, Bin Width, Number of Bins

Total Size (labels D, S, C): 61.5, plus 48 bytes for statistical data

(D: 6.0, S: 18.0, C:  37.5)



D01 LBL D  // data

D02 CLΣ

D03 STO X

D04 STO Y


S01 LBL S

S02 RCL X

S03 x<>y

S04 x>y?

S05 STO X

S06 RCL Y

S07 x<>y

S08 x<y?

S09 STO Y

S10 Σ+

S11 STOP

S12 GTO S


C01 LBL C

C02 RCL X

C03 STOP

C04 RCL Y

C05 STOP

C06 -

C07 49

C08 1

C09 %   // C07 - C09: build 0.49 in 4.5 bytes instead of 9.5 bytes

C10 3

C11 +

C12 Sx

C13 ×

C14 n

C15 3

C16 1/x

C17 y^x

C18 ÷

C19 STO H

C20 STOP

C21 RCL X

C22 RCL- Y

C23 RCL÷ H

C24 STO K

C25 STOP


Example


Data Set:

4.0

5.8

5.7

5.2

4.6

4.9

6.3

7.1

6.6

6.4


4 XEQ D

5.8 R/S

5.7 R/S

...

6.4 R/S

XEQ C


X:  max:  7.1

Y:  min:  4

h:  1.58387549541

k:  1.95722454763  (2 bins)


Source:


"Histogram"  Wikipedia.  Last Updated March 28, 2022. https://en.wikipedia.org/wiki/Histogram  Last Accessed March 31, 2022.  


Up next:  a review of the HP 45 - May 9, 2022


Eddie 


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


Thursday, May 5, 2022

HP 32S and HP 32SII Week: Jurin's Law - Capillary Rise

HP 32S and HP 32SII Week:  Jurin's Law - Capillary Rise 





Capillary Motion 


Jurin's law describes the motion of liquid in small tubes, as the height is inversely proportional to the tube's diameter (and radius).  Factors include the contact angle and the density of the liquid.


The height of the liquid is determined by:


h = (2 * σ * cos θ) / (ρ * g * r)


σ = surface tension of the liquid (N/m)  (T)

θ = the angle of liquid in degrees, from adhesive (0° to 90°) to cohesive (90° to 180°) (B)

ρ = density of liquid (kg/m^3) (D)

r = radius of the tube (m) (R)


HP 32S and HP 32SII: Jurin's Law

Size:  33.5 bytes


J01 LBL J

J02 DEG

J03 INPUT T

J04 INPUT B

J05 INPUT D

J06 INPUT R

J07 2

J08 RCL× T

J09 RCL B

J10 COS

J11 ×

J12 RCL D

J13 RCL× R

J14 9.80665

J15 ×

J16 ÷

J17 STOP


Example:

Find the capillary rise of water in a tube with radius of 0.1 m.   

Data:  σ = 0.0728 N/m, θ = 0°, and ρ = 1000 kg/m^3


Inputs:

T = 0.0728

B = 0

D = 1000

R = 0.1


Result:  1.48470681E-4 m  (height)


Source:


"Jurin's law" Wikipedia.  Last updated February 11, 2022.  https://en.wikipedia.org/wiki/Jurin%27s_law  Last Accessed April 1, 2022.  


Lindeburg, Michael R. PE   Civil Engineering Reference Manual for the PE Exam 14th Edition  Professional Publications, Inc:  Belmont, CA.  pp. 14-11 to 14-13


Eddie


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


Wednesday, May 4, 2022

HP 32S and HP 32SII Week: Total Drag

HP 32S and HP 32SII Week:  Total Drag





Introduction


The following equation calculates the total drag force applied to parallel to an area in the opposite direction of the object's motion.  


Fd = 1/2 * ρ * v^2 * Cd * A,   ρ = P / (R * T)


ρ = air pressure 

P = absolute pressure (101,325 Pa, 14.696 psi, 2116.224 lb/ft^2)

R = specific gas constant (287.03 J/(kg k), 53.3533 (ft lbf/lb °R))

T = temperature (K = °C + 273.15, °R = °F + 459.67)


A = cross area that the drag force is applied (m^2, ft^2)

V = velocity of the object (m/s, ft/s)

Cd = drag coefficient (unitless)


The program gives outputs:


ρ = air pressure (kg/m^3, lb/ft^3)

Fd = total drag (kg*m/s^2, lb*ft/s^2)


HP 32S/32SII Program:  Total Drag, SI Units

Size: 55.5 bytes


F01 LBL F

F02 INPUT C

F03 INPUT A

F04 INPUT V

F05 INPUT T

F06 273.15

F07 +

F08 287.03

F09 ×

F10 1/x

F11 101,325

F12 ×

F13 STOP

F14 RCL× C

F15 RCL× A

F16 RCL V

F17 x^2

F18 ×

F19 2

F20 ÷

F21 STOP


Example:

C = drag coefficient = 0.31

A = area =7.0686 m^2

T = temperature = 18.8 °C

V = velocity = 3 m/s


Results:

ρ = 1.20915184207 kg/m^3

Fd = 11.9230799416 kg*m/s^2


HP 32S/32SII Program:  Total Drag, US Units

Size: 55.5 bytes


F01 LBL F

F02 INPUT C

F03 INPUT A

F04 INPUT V

F05 INPUT T

F06 459.67

F07 +

F08 53.3533

F09 ×

F10 1/x

F11 2116.224

F12 ×

F13 STOP

F14 RCL× C

F15 RCL× A

F16 RCL V

F17 x^2

F18 ×

F19 2

F20 ÷

F21 STOP


Example:

C = drag coefficient = 0.31

A = area =76.0868 ft^2

T = temperature = 65.84 °F

V = velocity = 9.84252 ft/s


Results:

ρ = 7.54778228E-2 lb/ft^3

Fd = 86.232900381 lb*ft/s^2



Source:


Lindeburg, Michael R. PE   Civil Engineering Reference Manual for the PE Exam 14th Edition  Professional Publications, Inc:  Belmont, CA.  pp. 17-41 and 17-42


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


Tuesday, May 3, 2022

HP 32S and HP 32SII Week: Hypergeometric Distribution

 HP 32S and HP 32SII Week:  Hypergeometric Distribution





What are the Odds?


The hypergeometric probably function deals with taking samples without replacement.  The trials are not independent.  The probability formula is:


G(S; N, T, M) =

1 ÷ nCr(N, M) * nCr(T, S) * nCr(N-T, M-S)


S = number of successes

N = main population size

T = target's population size

M = sample size


nCr(x, y) = x! ÷ ( y! * (x - y)!)


HP 32S/32SII Program:  Hypergeometric Distribution Probability

Size: 30 bytes


H01 LBL H

H02 INPUT S

H03 INPUT N

H04 INPUT T

H05 INPUT M

H06 RCL N

H07 RCL M

H08 Cn,r

H09 1/x

H10 RCL T

H11 RCL S

H12 Cn,r

H13 ×

H14 RCL N

H15 RCL- T

H16 RCL M

H17 RCL-S

H18 Cn,r

H19 ×

H20 STOP


Examples:


What are the odds that four hearts are dealt out of a five card hand?  Assume a standard, 52 card deck.


S = 4 (4 hearts)

N = 52 (52 cards)

T = 13 (13 hearts)

M = 5 (5 card hand)


Result:  1.07292917E-2 (≈1.07%)


What are the odds that a pair of Kings are dealt out of a five card hand?  Assume a standard, 52 card deck.


S = 2 (2 Kings)

N = 52 (52 cards)

T = 13 (13 hearts)

M = 5 (5 card hand)


Result:  3.99298181E-2 (≈3.99%)


Source:


"Hypergeometric Distribution"  Texas Instruments Programmable Slide-Rule SR-56 Applications Library  pp. 58-59 Texas Instruments, 1976


Download the document here, with gratitude to Datamath:

http://www.datamath.net/Manuals/SR-56_AL_US.pdf


Eddie



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


Retro Review: Radio Shack EC-4026

Retro Review:   Radio Shack EC-4026 Quick Facts: Model:  EC-4026 Company:  Radio Shack Equivalent Of:  Casio fx-4500P, Casio fx-4500PA Years...