STUPID BUTUSEFUL CHALLENGE #879 - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: STUPID BUTUSEFUL CHALLENGE #879 (/thread-19666.html) |
STUPID BUTUSEFUL CHALLENGE #879 - Thibaut.be - 07-05-2002 The formula for constant annuity (TVM reimbursement) is : a = PV * i / (1-(1+i)^-n) write a program in as few possible steps to solve this equation, where you have previously entered the following variables in the stack : PV (= present value or lended amount, i (= interest (not in %, ie 6% = .06), n (number of payments
NB :
American people :
Thibaut
Re: STUPID BUT USEFUL CHALLENGE #879 - Thibaut.be - 07-05-2002 Oops, I posted the message above to fast.
- the PV, n and i vlaues can be stored wherever you want My solution is 15 steps long, including LBL/RTN. Who give a better one ? It could be 17 steps long with a 12C for the rollup function does not exist in the 12C (you spend 2 more bytes * 2) but the lbl and rtn funtions do not exist either (you save 2 bytes)
Enjoy !
13 steps - listing included...don't read unless you want to see it! - Gene - 07-05-2002 Ok, to make up for NOT READING the earlier challenge completely (I used a numeric key), I have a 41c style solution with 13 steps, including LBL and RTN. My inputs are n, PV, and i in the Z, Y, and X registers. I assumed that n is total number of payments and i was the periodic interest rate...if the payments are monthly then i is the monthly interest rate. Interestingly, I have 15 step solutions for PV, n, i and PV, i, n as the input order.
LBL 01
That seems to work. Anyone less than 13?
Re: 13 steps - listing included...don't read unless you want to see it! - Ed Martin - 07-05-2002 This is cheating ... a bit. If you put -n on the stack instead of N, you can do it in 12 steps:
LBL 01
- Ed
My solution... - Thibaut.be - 07-06-2002 Also 13 steps, without LBL and RTN, with n in Z, PV in Y and i in X :
LBL A Re: STUPID BUTUSEFUL CHALLENGE #879 - Jim Kimes - 07-07-2002 I suggest that when such challenges are posted--and they can be quite useful--a solved example be included so that the challengees will know positively they've understood the problem and exactly what kind of problem it is they're challenged to solve. In this case I could have produced a formula but I wouldn't have known for sure that the formula was exact without a sample by which to proof my work. Thanks.
Re: STUPID but Useful Challenges - Paul Brogger - 07-08-2002 I would think that the creative finance people from Enron and WorldCom could put their vast experience to use and contribute a few helpful hints under this Subject line . . .
Re: STUPID BUTUSEFUL CHALLENGE #879 - Thibaut.be - 07-08-2002 example :
You purchase a house for $500.000. Month rate is .05/12=0.42%/month. 15 years is 180 month
Key in Your should read a monthly payment of 3.964,39 per month...
Re: STUPID BUTUSEFUL CHALLENGE #879 - Jim Kimes - 07-12-2002 Thanks for the example. Helps immensely.
|