Re: 12C and its financial algorithms Message #8 Posted by hugh on 19 June 2003, 4:48 p.m., in response to message #6 by Tony
280 seconds! wait! whats's this. here comes the hp9g, cover flapping in the wind...
"I'll save you rpn mortals from evil tvm errors..."
"finding FV is easy with my 24 digit precision. don't panic kids, i'll just use the textbook formula fv=amt*((1+i)^n1)/i"
60*60*24*365>N
.1/N>I
.01*((1+I)^N1)/I = 31,667.0067
"ah! that was easy, now to solve for I in only 5 seconds.. just whisk together a quick solver..."
INPUT L,H,E;
E=10^(E)
X=L
GOSUB PROG 9;
A=Y
Lbl 1:
IF (ABS(HL) < E*ABS(H)) THEN { GOTO 2; }
X=H
GOSUB PROG 9;
B=Y
C=HB*(HL)/(BA)
L=H
A=B
H=C
GOTO 1;
Lbl 2:
X=C
END
"and the solvefor subroutine..."
Y=((1+X)^315360001)*.01/X
Y=Y331667.0067
END
"put in L=1e30, H=1e7, E=8 and presto!"
x=3.1709792e9 which is correct.
Gee, thanks 9g, i'll never doubt you again.
