Post Reply 
Some TVM fun
01-02-2024, 08:16 PM
Post: #5
RE: Some TVM fun
Hi, dm319

Plus42 does not evaluate f(ε), or its derivatives. Instead, it use taylor series:

f(ε) ≈ f(0) + f'(0)*ε
f'(ε) ≈ f'(0) + f''(0)*ε

RHS is easy to evaluate accurately, LHS may not, due to massive cancellations.

core_commands9.cc
Code:
    if (1 + i * i == 1) {
        phloat a = (pv + fv) / n;
        phloat b = pv - fv;
        phloat fp = (a + b) / 2;
        phloat fpp = (n * n - 1) * a / 6;
        f = a + pmt + fp * i;
        fp += fpp * i;
        i += (eps = -f / fp);
    } else {
    ...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Some TVM fun - dm319 - 01-01-2024, 10:12 PM
RE: Some TVM fun - Albert Chan - 01-02-2024, 12:51 AM
RE: Some TVM fun - Albert Chan - 01-02-2024, 01:47 PM
RE: Some TVM fun - dm319 - 01-02-2024, 07:37 PM
RE: Some TVM fun - Albert Chan - 01-02-2024 08:16 PM
RE: Some TVM fun - dm319 - 01-03-2024, 01:08 PM
RE: Some TVM fun - bxparks - 01-03-2024, 05:14 PM
RE: Some TVM fun - Albert Chan - 01-03-2024, 05:21 PM
RE: Some TVM fun - dm319 - 01-03-2024, 08:04 PM
RE: Some TVM fun - Albert Chan - 01-03-2024, 08:28 PM
RE: Some TVM fun - dm319 - 01-03-2024, 08:10 PM
RE: Some TVM fun - Albert Chan - 01-03-2024, 09:36 PM



User(s) browsing this thread: 2 Guest(s)