Post Reply 
Looking for TVM contributions
06-16-2024, 12:02 AM (This post was last modified: 06-16-2024 05:38 PM by Albert Chan.)
Post: #51
RE: Looking for TVM contributions
(06-15-2024 09:52 PM)robve Wrote:  Newton takes 103 evaluations total over all tests, Secant takes 151 evaluations (though they are a bit cheaper), Hybrid takes 104 evaluations and these are cheaper than Newton.

From your C code, I am guessing this is done with IEEE double?
What is g? Why is it needed?

With lua tvm(), it finished it all with 132+12 = 144 evaluations (last 3 was duplicated tests)

24 test samples, f evaluations + final rate included (mode BEGIN → END, for first 3 cases)
Code:
rate_test = {
{40,i,900-40,-40,-1000+40       ,4, 0.04753367188571021},
{40,i,900+1000,1000,-1000-1000  ,2, -0.49999999999997724},
{40,i,900-400,-400,-1000+400    ,3, 0.8000000000098451},    -- x2
{31536000,i,0,-.01,3331667.0067 ,8, 1.1694311188017701e-07},
{525600,i,0,-.01,5282.367769    ,6, 1.902587523612461e-08},
{525600,i,0,-.01,5260.382426    ,6, 3.170979198140072e-09}, -- x2

{32,i,1-1e6,0,1e6               ,3, 3.125001611329216e-08}, -- x2
{360,i,0,-1e3,1e6               ,7, 0.004980365840090327},
{328,i,35e3,-324,0              ,5, 0.008720569148340681},
{58,i,-775,-49.56,4e3           ,6, 0.0026058787514755544},
{32,i,-6e3,0,1e4                ,6, 0.016091394922276913},
{48,i,19198,-450,0              ,6, 0.004918000645880568},

{5,i,-369494,17500,540000       ,6, 0.1200000561803591},
{348,i,243400,-1363.29,0        ,5, 0.00437501742139102},
{30,i,-3200,-717.44,60000       ,6, 0.048750016694561145},
{60,i,243400,-1363.29,-222975.98,4, 0.00437499988799056},
{24,i,0,-50.26,1281.34          ,7, 0.005209314607602606},
{6,i,-32000,0,28346.96          ,4, -0.019999978033474884},

{60,i,8000,-150.97,0            ,7, 0.004166696417110639},
{456,i,270000,-1215.333333,0    ,6, 0.0036443486419549583},
{480,i,100000,-208.333333,0     ,6, -6.652806639543341e-12},
{10,i,50,-30,400                ,7, 0.1443587132807996},
{10,i,50,-30,80                 ,5, -0.36893369874177734},
{10,i,-100,10,0                 ,7, 0},
}

Update: tested again, but with i=false instead of i=nil, to use big sized edge.
Again, it finished in 132+12 = 144 evaluations (last 3 was duplicated tests)

Basically the same solved rate, except for #22 and #23, with 2 sign changes. (0 or 2 roots)
Code:
#22 n=10 pv=50 pmt=-30 fv=400
small edge = -30/400 = -0.075 --> i =  0.1443587132807996
  big edge = -30/-50 =  0.60  --> i =  0.5317221326838473

#23 n=10 pv=50 pmt=-30 fv=80
small edge = -30/80 = -0.375  --> i = -0.36893369874177734
  big edge = -30/-50 =  0.60  --> i =  0.5846195526622099
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 - Albert Chan - 06-16-2024 12:02 AM
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: 10 Guest(s)