Wed Sep 12 15:53:12 2018 BRENT_TEST: Python version: 3.6.5 Test the components of the BRENT library. GLOMIN_TEST Test the Brent GLOMIN routine, which seeks a global minimizer of a function F(X) in an interval [A,B], given some upper bound M for F". h_01(x) = 2 - x A X B F(A) F(X) F(B) 7.000000 9.000000 9.000000 -5.000000e+00 -7.000000e+00 -7.000000e+00 h_01(x) = 2 - x A X B F(A) F(X) F(B) 7.000000 9.000000 9.000000 -5.000000e+00 -7.000000e+00 -7.000000e+00 h_02(x) = x * x A X B F(A) F(X) F(B) -1.000000 0.000000 2.000000 1.000000e+00 0.000000e+00 4.000000e+00 h_02(x) = x * x A X B F(A) F(X) F(B) -1.000000 0.000000 2.000000 1.000000e+00 0.000000e+00 4.000000e+00 h_03(x) = x^3 + x^2 A X B F(A) F(X) F(B) -0.500000 0.000000 2.000000 1.250000e-01 9.315832e-18 1.200000e+01 h_03(x) = x^3 + x^2 A X B F(A) F(X) F(B) -0.500000 0.000000 2.000000 1.250000e-01 3.872097e-17 1.200000e+01 h_04(x) = ( x + sin(x) ) * exp(-x*x) A X B F(A) F(X) F(B) -10.000000 -0.679579 10.000000 -3.517696e-43 -8.242394e-01 3.517696e-43 h_05(x) = ( x - sin(x) ) * exp(-x*x) A X B F(A) F(X) F(B) -10.000000 -1.195137 10.000000 -3.922456e-43 -6.349053e-02 3.922456e-43 GLOMIN_TEST Normal end of execution. LOCAL_MIN_TEST Python version: 3.6.5 LOCAL_MIN seeks a local minimizer of a function F(X) in an interval [A,B]. g_01(x) = ( x - 2 ) * ( x - 2 ) + 1 g_01(2) = 1 g_02(x) = x * x + exp ( - x ) g_02(0.351734) = 0.827184 g_03(x) = x^4 + 2x^2 + x + 3 g_03(-0.236733) = 2.87849 g_04(x) = exp ( x ) + 1 / ( 100 x ) g_04(0.0953446) = 1.20492 g_05(x) = exp ( x ) - 2x + 1/(100x) - 1/(1000000x^2) g_05(0.703205) = 0.628026 g_06(x) = - x sin ( 10 pi x ) - 1 g_06(1.85055) = -2.85027 LOCAL_MIN_TEST Normal end of execution. LOCAL_MIN_RC_TEST Python version: 3.6.5 LOCAL_MIN_RC seeks a local minimizer of a function F(X) in an interval [A,B], using reverse communication. g_01(x) = ( x - 2 ) * ( x - 2 ) + 1 Step X F(X) 0 0.0000000000000000e+00 5.0000000000000000e+00 0 3.1415926535897931e+00 2.3032337867301855e+00 1 1.1999816148643265e+00 1.6400294165550906e+00 2 1.9416110387254664e+00 1.0034092707987190e+00 3 2.3999632297286531e+00 1.1599705851349753e+00 4 2.0000000000000000e+00 1.0000000000000000e+00 5 2.0000000298023224e+00 1.0000000000000009e+00 6 1.9999999701976776e+00 1.0000000000000009e+00 7 1.9999999701976776e+00 1.0000000000000009e+00 g_02(x) = x * x + exp ( - x ) Step X F(X) 0 0.0000000000000000e+00 1.0000000000000000e+00 0 1.0000000000000000e+00 1.3678794411714423e+00 1 3.8196601125010510e-01 8.2841628450359894e-01 2 6.1803398874989479e-01 9.2096909397414972e-01 3 2.3606797749978969e-01 8.4545507844277124e-01 4 3.5284968114951043e-01 8.2718570939867075e-01 5 3.5189171661040736e-01 8.2718405987403232e-01 6 3.5173204181824946e-01 8.2718402613129161e-01 7 3.5173370369581974e-01 8.2718402612752440e-01 8 3.5173371126154779e-01 8.2718402612752429e-01 9 3.5173371650278862e-01 8.2718402612752440e-01 10 3.5173371650278862e-01 8.2718402612752440e-01 g_03(x) = x^4 + 2x^2 + x + 3 Step X F(X) 0 -2.0000000000000000e+00 2.5000000000000000e+01 0 2.0000000000000000e+00 2.9000000000000000e+01 1 -4.7213595499957961e-01 3.0233786852494204e+00 2 4.7213595499957917e-01 3.9676505952485779e+00 3 -1.0557280900008412e+00 5.4156435160895509e+00 4 -1.4981389398891265e-01 2.8955782539160992e+00 5 -2.2268178171603575e-01 2.8789514581149742e+00 6 -2.3180724138501921e-01 2.8785493598638356e+00 7 -2.3705610192634397e-01 2.8784930339438439e+00 8 -2.3674552450274428e-01 2.8784927902458479e+00 9 -2.3673257047327609e-01 2.8784927898739858e+00 10 -2.3673290466844016e-01 2.8784927898737260e+00 11 -2.3673290114084491e-01 2.8784927898737260e+00 12 -2.3673289761324973e-01 2.8784927898737260e+00 13 -2.3673277265689888e-01 2.8784927898737664e+00 14 -2.3673284988417082e-01 2.8784927898737331e+00 15 -2.3673287938236384e-01 2.8784927898737274e+00 16 -2.3673289064967096e-01 2.8784927898737265e+00 17 -2.3673289064967096e-01 2.8784927898737265e+00 g_04(x) = exp ( x ) + 1 / ( 100 x ) Step X F(X) 0 1.0000000000000000e-04 1.0100010000500016e+02 0 1.0000000000000000e+00 2.7282818284590449e+00 1 3.8202781464898006e-01 1.4914289445643993e+00 2 6.1807218535101982e-01 1.8715271651909913e+00 3 2.3614437070203967e-01 1.3087040978426485e+00 4 1.4598344394694041e-01 1.2256779481342144e+00 5 9.0260926755099280e-02 1.2052497308359791e+00 6 6.9876089320806620e-02 1.2154857644926214e+00 7 1.0206373278725260e-01 1.2054320465850306e+00 8 9.5682026821930818e-02 1.2049219440137300e+00 9 9.5513043328965458e-02 1.2049209148472022e+00 10 9.5357230061606221e-02 1.2049205744553304e+00 11 9.5344301333980211e-02 1.2049205725338459e+00 12 9.5344606870298165e-02 1.2049205725326411e+00 13 9.5344617235426574e-02 1.2049205725326397e+00 14 9.5344618656172164e-02 1.2049205725326397e+00 15 9.5344620076917769e-02 1.2049205725326400e+00 16 9.5344620076917769e-02 1.2049205725326400e+00 g_05(x) = exp ( x ) - 2x + 1/(100x) - 1/(1000000x^2) Step X F(X) 0 2.0000000000000001e-04 2.5999800020001334e+01 0 2.0000000000000000e+00 3.3940558489306505e+00 1 7.6405562929796011e-01 6.3194096598803329e-01 2 1.2361443707020396e+00 9.7811582677204612e-01 3 4.7228874140407934e-01 6.8025188205591303e-01 4 6.8852744660756782e-01 6.2824858787213489e-01 5 7.0164600779463115e-01 6.2802824384538702e-01 6 7.0306627913679964e-01 6.2802574053725335e-01 7 7.0320840670692497e-01 6.2802572060607587e-01 8 7.0320487024672163e-01 6.2802572059286421e-01 9 7.0320484034719222e-01 6.2802572059286299e-01 10 7.0320482986862343e-01 6.2802572059286299e-01 11 7.0320481939005486e-01 6.2802572059286366e-01 12 7.0320481939005486e-01 6.2802572059286366e-01 g_06(x) = - x sin ( 10 pi x ) - 1 Step X F(X) 0 1.8000000000000000e+00 -9.9999999999999600e-01 0 1.8999999999999999e+00 -1.0000000000000111e+00 1 1.8381966011250106e+00 -2.7132588335917793e+00 2 1.8618033988749896e+00 -2.7352611345171618e+00 3 1.8763932022500212e+00 -2.2674853963381896e+00 4 1.8505395014762616e+00 -2.8502737088135595e+00 5 1.8505162089360063e+00 -2.8502728741704617e+00 6 1.8505475913237814e+00 -2.8502737667537623e+00 7 1.8505474661032337e+00 -2.8502737667680984e+00 8 1.8505474385279275e+00 -2.8502737667674056e+00 9 1.8505474936785400e+00 -2.8502737667674012e+00 10 1.8505474936785400e+00 -2.8502737667674012e+00 LOCAL_MIN_RC_TEST Normal end of execution. ZERO_TEST ZERO seeks a root X of a function F() in an interval [A,B]. f_01(x) = sin ( x ) - x / 2 f_01(1.89549) = -1.02977e-08 f_02(x) = 2 * x - exp ( - x ) f_02(0.351734) = -1.48522e-07 f_03(x) = x * exp ( - x ) f_03(-4.03522e-10) = -4.03522e-10 f_04(x) = exp ( x ) - 1 / ( 100 * x * x ) f_04(0.0953446) = 7.39127e-08 f_05(x) = (x+3) * (x-1) * (x-1) f_05(-3) = -8.59757e-13 ZERO_TEST Normal end of execution. ZERO_RC_TEST ZERO_RC seeks a root X of a function F() in an interval [A,B]. f_01(x) = sin ( x ) - x / 2 STATUS X F(X) 1 1 0.341471 2 2 -0.0907026 3 1.7901247 0.0809815 4 1.8891205 0.00520096 5 1.8955464 -4.26626e-05 6 1.8954941 1.58013e-07 7 1.8954943 4.76186e-12 8 1.8954944 -1.22039e-07 0 1.8954943 4.76186e-12 f_02(x) = 2 * x - exp ( - x ) STATUS X F(X) 1 0 -1 2 1 1.63212 3 0.37992181 0.0759287 4 0.35311057 0.00372163 5 0.35173382 2.82665e-07 6 0.35173367 -1.20183e-07 0 0.35173367 -1.20183e-07 f_03(x) = x * exp ( - x ) STATUS X F(X) 1 -1 -2.71828 2 0.5 0.303265 3 0.34944865 0.246388 4 -0.24852793 -0.318647 5 0.088696039 0.0811678 6 -0.013397964 -0.0135787 7 0.0012337235 0.0012322 8 1.6429166e-05 1.64289e-05 9 -4.035216e-10 -4.03522e-10 10 1.4860809e-07 1.48608e-07 0 -4.035216e-10 -4.03522e-10 f_04(x) = exp ( x ) - 1 / ( 100 * x * x ) STATUS X F(X) 1 0.0001 -999999 2 20 4.85165e+08 3 0.041238033 -4.83826 4 0.041238232 -4.83821 5 0.058141367 -1.89835 6 10.029071 22676.2 7 0.058976018 -1.81432 8 0.076997139 -0.606711 9 5.0530339 156.496 10 0.096213965 0.0207459 11 0.095578592 0.00563656 12 0.095343746 -2.10642e-05 13 0.09534462 7.39127e-08 14 0.095344471 -3.52845e-06 0 0.09534462 7.39127e-08 f_05(x) = (x+3) * (x-1) * (x-1) STATUS X F(X) 1 -5 -72 2 2 5 3 1.5454545 1.35237 4 1.380038 0.632604 5 1.2363083 0.236562 6 -1.8818459 9.28631 7 -3.4409229 -8.69579 8 -2.6869838 4.2551 9 -2.9346952 1.01104 10 -3.0038554 -0.061806 11 -2.9998712 0.00206145 12 -2.9999998 3.9686e-06 13 -3 -8.59757e-13 0 -3 -8.59757e-13 ZERO_RC_TEST Normal end of execution. BRENT_TEST: Normal end of execution. Wed Sep 12 15:53:13 2018