Post Reply 
Looking for TVM contributions
06-20-2024, 04:30 PM (This post was last modified: 06-23-2024 01:15 PM by robve.)
Post: #75
RE: Looking for TVM contributions
(06-19-2024 09:08 PM)Albert Chan Wrote:  Technically this setup should never encounter overshoot (f sign flip)
If we do see overshoot, it is due to rounding error (f = 0), rate is found.
No more auto-correction needed. It cannot get any better.

If f not improving (toward 0), and i not converging --> no solution.
[Image: images?q=tbn:ANd9GcTq8de1dhNClmc_6dPOoTP...p;usqp=CAU]

Well, try this example with Newton. The curve is parabolic with f''>0. We stop at sign change and take the last i%:
./tvm 10 '?' 50 -12.8277219567 80
1/0 i%= 3.08778325056 y= 0.0103695628259
2/0 i%= 3.59460137697 y= 0.00259881409493
3/0 i%= 3.8488202702 y= 0.00064807442555
4/0 i%= 3.97517959151 y= 0.000159382918897
5/0 i%= 4.03630943599 y= 3.72170552208e-05
6/0 i%= 4.06308588579 y= 7.13292596899e-06
7/0 i%= 4.07140713916 y= 6.88560398032e-07
8/0 i%= 4.07240259392 y= 9.85261117137e-09
9/0 i%= 4.07241725752 y= 2.14050999148e-12
10/0 i%= 4.07241726071 y= -3.5527136788e-15
10, i%=4.07241726070281285%, FVerr=2e-10

This is not a winning strategy IMHO. Newton stopping at non-monotonicity is better with previous i% when the last step wasn't monotonically decreasing:

./tvm 10 '?' 50 -12.8277219567 80
1/0 i%= 3.08778325056 y= 0.0103695628259
2/0 i%= 3.59460137697 y= 0.00259881409493
3/0 i%= 3.8488202702 y= 0.00064807442555
4/0 i%= 3.97517959151 y= 0.000159382918897
5/0 i%= 4.03630943599 y= 3.72170552208e-05
6/0 i%= 4.06308588579 y= 7.13292596899e-06
7/0 i%= 4.07140713916 y= 6.88560398032e-07
8/0 i%= 4.07240259392 y= 9.85261117137e-09
9/0 i%= 4.07241725752 y= 2.14050999148e-12
10/0 i%= 4.07241726071 y= -3.5527136788e-15
11/0 i%= 4.0724172607 y= 1.7763568394e-15
12, i%=4.07241726070545784%, FVerr=2.8e-14

With the Hybrid method we have no sign change and we hit the root even closer:
./tvm 10 '?' 50 -12.8277219567 80
3/0 i%= 3.7640993412 y= 0.00115435116452
4/0 i%= 3.89955465008 y= 0.000413574938126
5/0 i%= 3.97517927056 y= 0.000159383755689
6/0 i%= 4.02259765825 y= 5.81463133074e-05
7/0 i%= 4.04983268476 y= 2.02404140044e-05
8/0 i%= 4.06437522885 y= 6.04424116091e-06
9/0 i%= 4.07056694296 y= 1.27674678296e-06
10/0 i%= 4.0722250993 y= 1.29426121376e-07
11/0 i%= 4.07241215141 y= 3.43175443618e-09
12/0 i%= 4.07241724621 y= 9.73088276623e-12
13/0 i%= 4.0724172607 y= 1.7763568394e-15
14/0 i%= 4.0724172607 y= 1.7763568394e-15
14, i%=4.07241726070100896%, FVerr=1.4e-14

Note how many trailing digits of i% are actually irrelevant. This is an example why comparing decimal places of i% is just wrong in general, the point I made earlier. The reason for this is the flat curvature, hence more iterations are needed than usual to get to the root for this example. It depends on the TVM problem how many places are relevant. The relationship is nonlinear.

When we increase PMT a little bit then there is one root numerically (two roots very very close numerically indistinguishable) on the x-axis:
./tvm 10 '?' 50 -12.8277106125 80
For this specific case we can stop at a sign change without losing precision.

IMPORTANT: all such examples are anecdotal. Anecdotal examples are fine as counter examples to prove claims are incorrect (counter to a proof), but shall never be solely used to offer a general proof.

- Rob

"I count on old friends to remain rational"
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Looking for TVM contributions - dm319 - 05-12-2024, 06:58 PM
RE: Looking for TVM contributions - dm319 - 05-12-2024, 08:48 PM
RE: Looking for TVM contributions - dm319 - 05-12-2024, 08:49 PM
RE: Looking for TVM contributions - dm319 - 05-12-2024, 08:00 PM
RE: Looking for TVM contributions - dm319 - 05-14-2024, 11:04 AM
RE: Looking for TVM contributions - dm319 - 05-14-2024, 05:58 PM
RE: Looking for TVM contributions - dm319 - 05-14-2024, 05:59 PM
RE: Looking for TVM contributions - dm319 - 05-14-2024, 08:34 PM
RE: Looking for TVM contributions - dm319 - 05-14-2024, 08:31 PM
RE: Looking for TVM contributions - dm319 - 05-15-2024, 01:00 PM
RE: Looking for TVM contributions - dm319 - 05-15-2024, 12:57 PM
RE: Looking for TVM contributions - dm319 - 05-24-2024, 10:05 PM
RE: Looking for TVM contributions - dm319 - 05-25-2024, 01:43 PM
RE: Looking for TVM contributions - dm319 - 05-25-2024, 08:40 PM
RE: Looking for TVM contributions - dm319 - 05-24-2024, 11:22 AM
RE: Looking for TVM contributions - dm319 - 05-24-2024, 02:58 PM
RE: Looking for TVM contributions - dm319 - 05-24-2024, 09:22 PM
RE: Looking for TVM contributions - dm319 - 06-02-2024, 02:46 PM
RE: Looking for TVM contributions - robve - 06-09-2024, 02:04 AM
RE: Looking for TVM contributions - dm319 - 06-09-2024, 12:15 PM
RE: Looking for TVM contributions - robve - 06-09-2024, 03:29 PM
RE: Looking for TVM contributions - dm319 - 06-09-2024, 06:05 PM
RE: Looking for TVM contributions - dm319 - 06-09-2024, 10:00 PM
RE: Looking for TVM contributions - robve - 06-12-2024, 08:48 PM
RE: Looking for TVM contributions - robve - 06-14-2024, 03:23 PM
RE: Looking for TVM contributions - robve - 06-14-2024, 10:11 PM
RE: Looking for TVM contributions - robve - 06-15-2024, 03:54 AM
RE: Looking for TVM contributions - dm319 - 06-12-2024, 11:56 PM
RE: Looking for TVM contributions - robve - 06-15-2024, 03:05 AM
RE: Looking for TVM contributions - robve - 06-15-2024, 05:48 PM
RE: Looking for TVM contributions - robve - 06-15-2024, 09:52 PM
RE: Looking for TVM contributions - robve - 06-15-2024, 01:38 PM
RE: Looking for TVM contributions - robve - 06-16-2024, 05:18 PM
RE: Looking for TVM contributions - Werner - 06-17-2024, 05:11 PM
RE: Looking for TVM contributions - robve - 06-16-2024, 08:26 PM
RE: Looking for TVM contributions - dm319 - 06-16-2024, 11:55 PM
RE: Looking for TVM contributions - robve - 06-17-2024, 09:03 PM
RE: Looking for TVM contributions - robve - 06-18-2024, 03:27 AM
RE: Looking for TVM contributions - robve - 06-19-2024, 12:57 AM
RE: Looking for TVM contributions - robve - 06-19-2024, 02:01 AM
RE: Looking for TVM contributions - robve - 06-19-2024, 03:47 PM
RE: Looking for TVM contributions - robve - 06-20-2024, 04:03 AM
RE: Looking for TVM contributions - robve - 06-20-2024, 05:07 PM
RE: Looking for TVM contributions - robve - 06-20-2024 04:30 PM
RE: Looking for TVM contributions - robve - 06-20-2024, 06:27 PM
RE: Looking for TVM contributions - robve - 06-20-2024, 02:33 AM
RE: Looking for TVM contributions - robve - 06-21-2024, 09:04 PM
RE: Looking for TVM contributions - robve - 06-22-2024, 08:00 PM
RE: Looking for TVM contributions - robve - 06-23-2024, 06:03 PM
RE: Looking for TVM contributions - dm319 - 07-05-2024, 09:39 PM
RE: Looking for TVM contributions - dm319 - 07-05-2024, 09:44 PM



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