Saturday, June 24, 2023

Casio fx-3650P Program Bank

Casio fx-3650P Program Bank



Economic Order Quantity


The program calculates three business parameters:


*  EOQ:  Economic Order Quantity: this is the optimum number of units to order in a single of order of items to be sold.  Each single inventory item has its on economic order quantity.   The calculation assumes every order will be available when needed.  This number of units is theoretical.  The calculation takes the estimated annual sales of units into account.  


*  The estimated amount of orders needed in a year.


*  The estimated annual cost of inventory.


Note that no amounts are rounded in this algorithm, all results are based on the theoretical values.


Formulas:


EOQ = √(2 × A × B ÷ (C% × D))


where:

A = cost to  place an order

B = annual sales of units

C = holding costs percentage 

D = cost per unit

EOQ is stored in X.


Orders per Year = B ÷ EOQ

The result is stored in Y. 


Estimated Annual Cost = A × amount of orders per year

Estimated annual cost is stored in M.



Program Code:  (47 steps)

(spaces are included for clarity)


Fix 2 : ? → A : ? → B : ? → C : ? → D : 

√ ( 2 A B ÷ 100(^-1) C × D → X ◢

B ÷ X → Y ◢

A Y → M ◢

Norm 1



Example:


Inputs:

A = cost to  place an order = $ 79.36

B = annual sales of units = 100,000

C = holding costs percentage = 24%

D = cost per unit = $ 1.20


Outputs:

X = EOQ ≈ 7,423.69

Y = Orders per Year ≈ 13.47

M = Estimated annual cost ≈ $1,069.01


Source:


Hewlett Packard.   Step-by-Step Solutions For Your HP Calculator: Marketing and Sales:  HP-17B, HP-19B, HP-27S.   Hewlett Packard.  Edition 1.  January 1988. 



Banker's Rounding


We will focus on rounding positive numbers to integers.   


Banker's rounding is similar to regular rounding except, when the number has a fraction part of 0.5, the number is rounded to the nearest even integer.


For example:  both 17.5 and 18.5 would be rounded to 18.  


We can accomplish Banker's rounding by these algorithms, assuming x is a positive number (x>0):


If abs(frac(x)) = 0.5 

Then round(x ÷ 2, 0) × 2

Else round(x, 0) 

IfEnd


If mod(x,1) = 0.5

Then round(x ÷ 2, 0) × 2

Else round(x, 0) 

IfEnd


The fx-3650P does not have a modulus or absolute value function.   We can accomplish absolute value by using √(x^2).


Program Code:  (46 steps)

(spaces are included for clarity)


? → A : Fix 0 : Rnd : Ans → B :

√ ( ( A - B ) ² ) ≠ 0.5 ⇒ Goto 1 :

A ÷ 2 : Rnd : 2 Ans → B :

Lbl 1 : Norm 1: B


Examples:


A = 36.3,  result = 36

A = 36.5,  result = 36

A = 37.5,  result = 38

A = 40.5,  result = 40

A = 41.2,  result = 41



Birthday Probably Function


What are odds that A people/objects do not a share a characteristic in C categories?   


Famously stated:  what are odds that N people do not share a birthday in a 365-day year?  


The probability is calculated as:


p = Π(1 - m ÷ C, m = 1, N - 1) = nPr(C, N) ÷ C^N



Program Code:  (19 steps)

(spaces are included for clarity)


? → A : ? → C :

C [nPr] A ÷ ( C ^ A ) → B


nPr appears as a bold P.


Example:


Probability that 24 people do not share a birthday:

A = 24, C = 365,  result = 0.461655742


Probability that 40 students who do not share a college class, if the college offers 300 classes:

A = 40, C = 300, result = 0.065725193



Voltage Drop of a Copper Wire


The program calculates the voltage drop of a copper wire (conductivity of 12.9).  The wire is assumed to be insulated at 75°C. 


Formula:


1 Phase: (domestic and office appliances)

VD = 2 × 12.9 × B × D ÷ C


3 Phase: (large electronic equipment)

VD = √3 × 12.9 × B × D ÷ C = 1-Phase-VD × √3 ÷ 2


B = current (amps)

C = circular mils* (see below)

D = length of the wire (feet)


C:  

Enter the wire cross area in circular mils.  However, the code allows for three common wire types:


C = 10  (AWG 10):  10,380

C = 12  (AWG 12):  6,530

C = 14  (AWG 14):  4,110


The voltage drop for both 1 phase (stored in X), followed by 3 phase circuits (stored in Y) are displayed.  


Program Code:  (72 steps)

(spaces are included for clarity)


? → B :

? → C :

C = 10 ⇒ 10380 → C :

C = 12 ⇒ 6530 → C :

C = 14 ⇒ 4110 → C :

? → D :

2 × 12.9 × B × D ÷ C → X ◢

X × √3 ÷ 2 → Y


Examples:


Input:

B = Current = 300 A

C = 10  for a #10 AWG wire

D = Length = 24 ft


1 phase voltage drop:  17.89595376

3 phase voltage drop:  15.49835058



Input:

B = Current = 320 A

C = 14  for a #14 AWG wire

D = Length = 30 ft


1 phase voltage drop:  60.26277372

3 phase voltage drop:  52.18909295



Eddie


All original content copyright, © 2011-2023.  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 30Xa Algorithms: Fundamental Horizontal Circle Calculations

  TI 30Xa Algorithms: Fundamental Horizontal Circle Calculations Introduction and Formulas Given the following: r = radi...