Prime and Saturn calculators
|
07-07-2024, 01:37 PM
Post: #15
|
|||
|
|||
RE: Prime and Saturn calculators
(07-06-2024 10:44 PM)Albert Chan Wrote: HP-12c internals is still a mystery ... Why would it overshoot to negative rate? Here is plot of {NPV, NPMT, NFV}, rate = ± 10% Curves practically overlap when rate are tiny. plot { ((1e-10-10/x)*((1+x)^-10-1)+(-100+1e-10)), (((-100+1e-10)/((1+x)^10-1)-100)*x+10)*10, ((-100+10/x)*((1+x)^10-1) + (-100+1e-10)) }, x = -0.1 .. 0.1 Unlike NPMT or NFV, NPV is concaved up. Rate guess from the right, NPV=0 with Newton's method may overshoot, even to negative rate. But, overshoot should occur only once, which means we won't notice. We see the issue with NPV zoom-in (±1e-6%). Line look like a smudge. This explained why we observed multiple overshoots, even to final iteration. plot {((1e-10-10/x)*((1+x)^-10-1)+(-100+1e-10))}, x = -1e-8 .. 1e-8 With good expm1/log1p, fuzziness will be lessened, but still a smudge. If rate=0, formula resulted in nan. This is why small rate branch is needed. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)