The HP Calculator Specialist

- How to program an HP15c
- More programming the 15c
- HP15c programming examples
- HP-15C: Library of complex-number utilities
- Gamma function for complex numbers
- True Heading and Ground Speed
- HP-15C: Time Value of Money
- Another Time Value of Money program
- Factorial for big numbers
- Greatest Common Devisor, Least Common Multiple, Fraction Finder
- Moonlanding
- Little Gauss - sum of integers up to n
- Quadratic Equation program
- Quadratic Equation II (shorter)
- Statistic with Grouped Data
- Z-Confidence Interval for Mean and Proportion
- Deck Of Cards
- Cubical interpolation (Newton scheme)
- Eigenvalue Extraction
- Log of large Factorials (Nemes' formula)
- Prime number check
- Simple Time Value of Money
- Quadratic Equation III
- Quadratic Equation solver IV
- New HP15c LE speed comparison and reference
- HP15c Manual
- HP 15C: Julian Date

- Weighted Average

The weighted average uses the statistic registers and leaves avg(y) weighted by x in y, and avg(x) weighted by y in x:

Lbl 0 -so that it coincides in the same key as avg(x)

rcl 7

rcl / 3

rcl 7

rcl / 5

rtn

Excuse the poor programming technique.

The Net Present Value and IRR are a little longer. Requires 11 registers and is valid for up to 10 periods. Data is not destroyed and can be used with other interest rates. I take care of not using labels used by TVM!

Net Present Value: It takes the following arguments:

Number of periods: register .1

Initial cashflow: register 0

cashflows for periods 1 to 9: registers 1 to 9 (how clever ;-))

discount rate in %: register x

NPV result: register x

LBL 1

EEX

2 - from % to decimal

/

1

+

1/x - calculate 1/(1+i)

ENTER

ENTER

ENTER - to load the stack with 1/(1+i)

RCL .1 - number of periods (so that is is kept for further trials with other interest rates)

STO I

CLX

LBL .2 - loop for periods

RCL + (I)

X - calculates f(n) = (f(n-1)+ I(n))/(1+i)

DSE I

GTO .2 - Return if not 0

RCL + 0 - Add start cashflow

RTN

**Weighted Average**

The weighted average uses the statistic registers and leaves avg(y) weighted by x in y, and avg(x) weighted by y in x:

Lbl 0 -so that it coincides in the same key as avg(x)

rcl 7

rcl / 3

rcl 7

rcl / 5

rtn

**NPV and IRR**

The Net Present Value and IRR are a little longer. Requires 11 registers and is valid for up to 10 periods. Data is not destroyed and can be used with other interest rates. I take care of not using labels used by TVM!

Net Present Value: It takes the following arguments:

Number of periods: register .1

Initial cashflow: register 0

cashflows for periods 1 to 9: registers 1 to 9 (how clever ;-))

discount rate in %: register x

NPV result: register x

LBL 1

EEX

2 - from % to decimal

/

1

+

1/x - calculate 1/(1+i)

ENTER

ENTER

ENTER - to load the stack with 1/(1+i)

RCL .1 - number of periods (so that is is kept for further trials with other interest rates)

STO I

CLX

LBL .2 - loop for periods

RCL + (I)

X - calculates f(n) = (f(n-1)+ I(n))/(1+i)

DSE I

GTO .2 - Return if not 0

RCL + 0 - Add start cashflow

RTN

IRR - this is the elegance of the HP-15 - just load your guesses in x and I and use SOLVE ( f SOLVE 1)

Speed comparisons for HP15c