Genie Software

To load the software, click on the SOFTWARE icon on your desktop leading to the executable Genie.exe. The Genie is interactive -- issue a command, receive a result. Commands may also be put into a command file and executed. To exit, enter :Q to quit.

Right clicking in the top margin of the window running the application and left clicking on properties followed by layout allows you to adjust the window size in the Windows operating system. Adjust for best viewing. PropertiesColors allows you to select the colors for the screen background and screen text.

Software expressions are shown bold and enclosed in parentheses. Some basic calculations follow in communicating with the Genie.

(+ 1 2 3 4 5) 15 (- 1 2 3 4 5) -13(* 1 2 3 4 5)  120(/ 16 8 4)  0.5

(expt 2 3)  8(+ (expt 2 3) (expt 3 2)) 17 (+ (* 2 3 4) (/ 16 8)) 26

(list 'a 'b 'c)  (A B C) (cons 'a '(b c))  (A B C) (append '(A B) '(C D)) (A B C D)

(random 1000) returns a random integer from 0 to 999. (random 1000.0) returns a random number between 0 and 1000.

The commands always return something. The software uses * for the last value returned and ** for the next to last value returned and *** for the third from last value returned. Thus after entering 2 3 4 in turn, the command (* * ** ***) returns 24. The first * denotes multiplication, the second * denotes 4, ** denotes 3 and *** denotes 2. The substitution of the *'s can save time.

The semicolon is used to indicate comments for code documentation.

Templates are in bold with arguments in italics. Commands are in bold. Note that

(mulist-of-numbers) is a template whereas (mu '(1 2 3 4 5)) is a command returning the mean 3. If list-of-numbers is assigned to an actual list, then (mu list-of-numbers) is a command.

Pressing the keys F3, F7 and F9 can help in editing and executing previous commands.

KeyFunction

F3 …………………………………………………………….. Brings up last command for execution

F7 ……………………………………………………………… Displays prior commands by number

As shown. Highlight a command and press Enter.

25: (anova cables)

26: (combination '(A B C D E) 3)

27: (pick-until 4 10)

28: (pi1000)

30: (firstn 100 (pi1000))

31: (sim-coins-1-1 100 1/2 10)

32: (sim-coins 1000 1/2 10)

F9 ……………………………………………………………….. │Enter command number:28

Brings up command 28(pi1000) for execution. Can be used in conjunction with F7.

 key also brings up the prior commands with each pressing. The down arrow key proceeds in

the opposite direction.

The main commands to help you understand the functions used in the text are:

Setf (setf x '(1 2 3 4 5)); assigns x to the list of integers 1 to 5. When x is entered,

; (1 2 3 4 5) is returned.

Mu (mu x); 3 is returned as mu returns the mean of x.

Mapcar (mapcar #' square x) ; returns '(1 4 9 16 25) squaring each in x; akamapcar

List-of (list-of 4 x) ; returns((1 2 3 4 5) (1 2 3 4 5) (1 2 3 4 5) (1 2 3 4 5))

Random (random 10); returns a random integer between 0 and 9.

(random -10.0); returns a random number between 0 and -9.

Sum (sum x); returns 15

Count (count 1 '(1 1 3 1 4)) ; returns 3.

Nth (nth 2 x); returns 3 as nth is 0-based

First(first x); 1

Fifth(fifth x); 5

Firstn (firstn 3 x); (1 2 3)

Flatten(flatten '((1 2)(3 4))) ; returns (1 2 3 4)

Upto(upto 10); (1 2 3 4 5 6 7 8 9 10)

Pi1000 (pi1000); returns the list of the first 1000 decimal digits of .

From-a-to-b (from-a-to-b 3 9 2) ; returns (3 5 7 9) in increments of 2. The default is 1.

Ensure that the parentheses balance before entering a command.

Nearly all simulations are preceded by the prefix sim- as in (sim-dice-roll 1000).

(doc 'function-name) returns the arguments for the function. For example,

(doc 'square) returns number, implying the square function takes a numerical argument.

(args 'square) is an alias for doc

Engineering Economy Functions

FGP or F/P (FGP 1000 10 5)  $1610.51

PGF or P/F

PGA or P/A

AGP or A/P

PGG -- arithmetic gradient (PGG A G i n)

PGGG -- geometric gradient(PGGG A g i n)

FGGG -- geometric gradient(FGGG A g i n)

AGG or A/G

(CRWR P S i n); capital recovery

(Bond-ratefirst-cost coupon-rate n face-value optional-m)

(Cum-add list)

(Ieff APR m); effective interest rate

(APR ieff n) ; returns the APR

(List-pgf '(-1000 200 300 700 -200) 8)

(IGPFN P F n) returns the interest rate.

(NGPFI P F i) returns the number of pay periods.

(PPMT loan rate n N) ; Principal reduction on nth payment

(IPMT loan rate n N) ; Interest paid on nth payment

(Loan P i N)

(Loan% i N n) nth payment percent paid on loan

(Balance P i N n)

(Total-Int loan rate n N)

(MIRR cf negative-rate positive-rate)

(NGPFI P F i) returns the number of pay periods

(PW-cycle n m i) returns cycle factor using least common multiple

(Sim-lc first-cost N L-%); learning curve

Depreciation

(St-line P S n)

(St-line-table P S n)

(SOYD P S n)

(SOYD-table P S n)

(Ddb-n P S n N DB)

(DDB P S N db)

(Db-table P N db)

(Depreciation P S N optional-2)

(Macrs n)

(Macrs-table)~ modified accelerated cost recovery system table

Inflation

(Mintinflation effective) ; returns market rate

(Ief f mint) ; returns effective rate

(Fbar F P n); returns average inflation rate