diff --git a/src/madness/mra/test_sepop.cc b/src/madness/mra/test_sepop.cc index 31fe223b38f..ae5d4e8ef65 100644 --- a/src/madness/mra/test_sepop.cc +++ b/src/madness/mra/test_sepop.cc @@ -39,14 +39,15 @@ using std::max; namespace madness { using std::abs; - bool test_rnlp() { + bool test_rnlp(const bool log_errors) { long i, n, l; Tensor r; double maxerr = 0.0; const double pi = 3.14159265358979323846264338328; double exact, err; + const double err_tolerance = 1e-13; { - //cout << "Testing accuracy of rnlp against results from Maple" << endl; + if (log_errors && err >= err_tolerance) cout << "Testing accuracy of rnlp against results from Maple" << endl; double a = 1e-4; GaussianConvolution1D g(8,sqrt(a/pi),a,0,false); n = 0; @@ -55,17 +56,17 @@ namespace madness { i = 0; exact = 5.64057956799766339e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -3.19741057080945913e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.81799864246383464e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=-1; @@ -73,17 +74,17 @@ namespace madness { i = 0; exact = 5.64170777792480805e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.06615886053515213e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.82194856723151343e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=0; @@ -91,17 +92,17 @@ namespace madness { i = 0; exact = 5.64170777792480805e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.06615886053515213e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.82194856723151343e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=1; @@ -109,17 +110,17 @@ namespace madness { i = 0; exact = 5.64057956799766339e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 3.19741057080945913e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.81799864246383464e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=2; @@ -127,17 +128,17 @@ namespace madness { i = 0; exact = 5.63832382494524470e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 5.32546574080415871e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.81010590087371315e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-2; @@ -145,12 +146,12 @@ namespace madness { i = 0; exact = 1.41047267328181405e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.22018791972360980e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-1; @@ -158,12 +159,12 @@ namespace madness { i = 0; exact = 1.41047377521394878e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -4.06729836170390096e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=0; @@ -171,12 +172,12 @@ namespace madness { i = 0; exact = 1.41047377521394878e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.06729836170390096e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=1; @@ -184,12 +185,12 @@ namespace madness { i = 0; exact = 1.41047267328181405e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.22018791972360980e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=2; @@ -197,12 +198,12 @@ namespace madness { i = 0; exact = 1.41047046942012737e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.03364123692283645e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-2; @@ -210,7 +211,7 @@ namespace madness { i = 0; exact = 3.52618488461890419e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-1; @@ -218,7 +219,7 @@ namespace madness { i = 0; exact = 3.52618489537996637e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=0; @@ -226,7 +227,7 @@ namespace madness { i = 0; exact = 3.52618489537996637e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=1; @@ -234,7 +235,7 @@ namespace madness { i = 0; exact = 3.52618488461890419e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=2; @@ -242,7 +243,7 @@ namespace madness { i = 0; exact = 3.52618486309677983e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-2; @@ -250,7 +251,7 @@ namespace madness { i = 0; exact = 8.81546224281108936e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-1; @@ -258,7 +259,7 @@ namespace madness { i = 0; exact = 8.81546224291617701e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=0; @@ -266,7 +267,7 @@ namespace madness { i = 0; exact = 8.81546224291617701e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=1; @@ -274,7 +275,7 @@ namespace madness { i = 0; exact = 8.81546224281108936e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=2; @@ -282,7 +283,7 @@ namespace madness { i = 0; exact = 8.81546224260091135e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-2; @@ -290,7 +291,7 @@ namespace madness { i = 0; exact = 2.20386556073330313e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-1; @@ -298,7 +299,7 @@ namespace madness { i = 0; exact = 2.20386556073340579e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=0; @@ -306,7 +307,7 @@ namespace madness { i = 0; exact = 2.20386556073340579e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=1; @@ -314,7 +315,7 @@ namespace madness { i = 0; exact = 2.20386556073330313e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=2; @@ -322,7 +323,7 @@ namespace madness { i = 0; exact = 2.20386556073309815e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-2; @@ -330,7 +331,7 @@ namespace madness { i = 0; exact = 5.50966390183355599e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-1; @@ -338,7 +339,7 @@ namespace madness { i = 0; exact = 5.50966390183355769e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=0; @@ -346,7 +347,7 @@ namespace madness { i = 0; exact = 5.50966390183355769e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=1; @@ -354,7 +355,7 @@ namespace madness { i = 0; exact = 5.50966390183355599e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=2; @@ -362,7 +363,7 @@ namespace madness { i = 0; exact = 5.50966390183355430e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); } { @@ -374,22 +375,22 @@ namespace madness { i = 0; exact = 5.51198365960967815e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -3.07636514759748877e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.39004237222238520e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 3.05711391835261338e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=-1; @@ -397,22 +398,22 @@ namespace madness { i = 0; exact = 5.62314580091424487e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.06031221284974586e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.77004995102873103e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 1.09765925398799329e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=0; @@ -420,22 +421,22 @@ namespace madness { i = 0; exact = 5.62314580091424487e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.06031221284974586e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.77004995102873103e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -1.09765925398799329e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=1; @@ -443,22 +444,22 @@ namespace madness { i = 0; exact = 5.51198365960967815e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 3.07636514759748877e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.39004237222238520e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -3.05711391835261338e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=2; @@ -466,22 +467,22 @@ namespace madness { i = 0; exact = 5.29620851243244872e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.79304691694024367e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.69661200992196493e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -4.36848047760689648e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-2; @@ -489,17 +490,17 @@ namespace madness { i = 0; exact = 1.41034540671661907e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.22000442699401760e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.20320972136612724e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-1; @@ -507,17 +508,17 @@ namespace madness { i = 0; exact = 1.41045559353827048e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -4.06721097934550646e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.20550942666829470e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=0; @@ -525,17 +526,17 @@ namespace madness { i = 0; exact = 1.41045559353827048e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.06721097934550646e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.20550942666829470e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=1; @@ -543,17 +544,17 @@ namespace madness { i = 0; exact = 1.41034540671661907e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.22000442699401760e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.20320972136612724e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=2; @@ -561,17 +562,17 @@ namespace madness { i = 0; exact = 1.41012505889650305e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.03281124249789191e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.19861192757157094e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-2; @@ -579,12 +580,12 @@ namespace madness { i = 0; exact = 3.52618364171646210e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -4.65465182972746039e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-1; @@ -592,12 +593,12 @@ namespace madness { i = 0; exact = 3.52618471782244636e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.55155139906883680e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=0; @@ -605,12 +606,12 @@ namespace madness { i = 0; exact = 3.52618471782244636e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.55155139906883680e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=1; @@ -618,12 +619,12 @@ namespace madness { i = 0; exact = 3.52618364171646210e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.65465182972746039e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=2; @@ -631,12 +632,12 @@ namespace madness { i = 0; exact = 3.52618148950547801e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 7.75774515795399146e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-2; @@ -644,7 +645,7 @@ namespace madness { i = 0; exact = 8.81546223067336716e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-1; @@ -652,7 +653,7 @@ namespace madness { i = 0; exact = 8.81546224118221681e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=0; @@ -660,7 +661,7 @@ namespace madness { i = 0; exact = 8.81546224118221681e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=1; @@ -668,7 +669,7 @@ namespace madness { i = 0; exact = 8.81546223067336716e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=2; @@ -676,7 +677,7 @@ namespace madness { i = 0; exact = 8.81546220965566786e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-2; @@ -684,7 +685,7 @@ namespace madness { i = 0; exact = 2.20386556072144996e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-1; @@ -692,7 +693,7 @@ namespace madness { i = 0; exact = 2.20386556073171247e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=0; @@ -700,7 +701,7 @@ namespace madness { i = 0; exact = 2.20386556073171247e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=1; @@ -708,7 +709,7 @@ namespace madness { i = 0; exact = 2.20386556072144996e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=2; @@ -716,7 +717,7 @@ namespace madness { i = 0; exact = 2.20386556070092493e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-2; @@ -724,7 +725,7 @@ namespace madness { i = 0; exact = 5.50966390183344046e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-1; @@ -732,7 +733,7 @@ namespace madness { i = 0; exact = 5.50966390183354075e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=0; @@ -740,7 +741,7 @@ namespace madness { i = 0; exact = 5.50966390183354075e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=1; @@ -748,7 +749,7 @@ namespace madness { i = 0; exact = 5.50966390183344046e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=2; @@ -756,7 +757,7 @@ namespace madness { i = 0; exact = 5.50966390183323988e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); } { @@ -768,32 +769,32 @@ namespace madness { i = 0; exact = 7.63107360346189367e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.39326380508023582e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -3.96841677858563145e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 8.75661865077648466e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 8.82410737907618627e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -1.30949951473492010e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=-1; @@ -801,32 +802,32 @@ namespace madness { i = 0; exact = 4.21350396474857447e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -6.17983307932157278e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 4.43199670152667480e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 3.35647464179302069e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -3.57967506112678285e-11; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -1.36118274898628887e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=0; @@ -834,32 +835,32 @@ namespace madness { i = 0; exact = 4.21350396474857447e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 6.17983307932157278e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 4.43199670152667480e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -3.35647464179302069e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -3.57967506112678285e-11; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 1.36118274898628887e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=1; @@ -867,32 +868,32 @@ namespace madness { i = 0; exact = 7.63107360346189367e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.39326380508023582e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -3.96841677858563145e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -8.75661865077648466e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 8.82410737907618627e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 1.30949951473492010e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=2; @@ -900,32 +901,32 @@ namespace madness { i = 0; exact = 2.32782224202434003e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -3.68552701680425695e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 4.13775061144892418e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 1.60042507022451686e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.96088571198545215e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 1.41367897661257123e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-2; @@ -933,22 +934,22 @@ namespace madness { i = 0; exact = 1.39768454157893490e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.20177712692920616e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -3.94868219678417840e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 7.31566593570543275e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-1; @@ -956,22 +957,22 @@ namespace madness { i = 0; exact = 1.40863955444774147e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -4.05848287082555859e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.17520807696470182e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.51168860115838423e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=0; @@ -979,22 +980,22 @@ namespace madness { i = 0; exact = 1.40863955444774147e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.05848287082555859e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.17520807696470182e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -2.51168860115838423e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=1; @@ -1002,22 +1003,22 @@ namespace madness { i = 0; exact = 1.39768454157893490e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.20177712692920616e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -3.94868219678417840e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -7.32150795271814975e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=2; @@ -1025,22 +1026,22 @@ namespace madness { i = 0; exact = 1.37602944516084069e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.95125817624941723e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -3.51139113424138104e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -1.15110485207894889e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-2; @@ -1048,12 +1049,12 @@ namespace madness { i = 0; exact = 3.52605935399162088e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -4.65437839301828836e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-1; @@ -1061,12 +1062,12 @@ namespace madness { i = 0; exact = 3.52616696215172984e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.55153837798979186e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=0; @@ -1074,12 +1075,12 @@ namespace madness { i = 0; exact = 3.52616696215172984e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.55153837798979186e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=1; @@ -1087,12 +1088,12 @@ namespace madness { i = 0; exact = 3.52605935399162088e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.65437839301828836e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=2; @@ -1100,12 +1101,12 @@ namespace madness { i = 0; exact = 3.52584414752294961e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 7.75650823576525769e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-2; @@ -1113,12 +1114,12 @@ namespace madness { i = 0; exact = 8.81546101690129993e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.77560940279273474e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-1; @@ -1126,12 +1127,12 @@ namespace madness { i = 0; exact = 8.81546206778619640e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -5.91869918524889379e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=0; @@ -1139,12 +1140,12 @@ namespace madness { i = 0; exact = 8.81546206778619640e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 5.91869918524889379e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=1; @@ -1152,12 +1153,12 @@ namespace madness { i = 0; exact = 8.81546101690129993e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.77560940279273474e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=2; @@ -1165,12 +1166,12 @@ namespace madness { i = 0; exact = 8.81545891513188171e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.95934782871507479e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-2; @@ -1178,7 +1179,7 @@ namespace madness { i = 0; exact = 2.20386555953612550e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-1; @@ -1186,7 +1187,7 @@ namespace madness { i = 0; exact = 2.20386556056238053e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=0; @@ -1194,7 +1195,7 @@ namespace madness { i = 0; exact = 2.20386556056238053e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=1; @@ -1202,7 +1203,7 @@ namespace madness { i = 0; exact = 2.20386555953612550e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=2; @@ -1210,7 +1211,7 @@ namespace madness { i = 0; exact = 2.20386555748361586e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-2; @@ -1218,7 +1219,7 @@ namespace madness { i = 0; exact = 5.50966390182186538e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-1; @@ -1226,7 +1227,7 @@ namespace madness { i = 0; exact = 5.50966390183188666e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=0; @@ -1234,7 +1235,7 @@ namespace madness { i = 0; exact = 5.50966390183188666e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=1; @@ -1242,7 +1243,7 @@ namespace madness { i = 0; exact = 5.50966390182186538e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=2; @@ -1250,7 +1251,7 @@ namespace madness { i = 0; exact = 5.50966390180182065e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); } { @@ -1262,32 +1263,32 @@ namespace madness { i = 0; exact = 5.00000000000000000e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 6.10756752342258014e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.93454443422216120e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -6.74867032786444360e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.24739852592635793e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 1.43294933024935476e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=0; @@ -1295,32 +1296,32 @@ namespace madness { i = 0; exact = 5.00000000000000000e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -6.10756752342258014e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.93454443422216120e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 6.74867032786444360e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.24739852592635793e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -1.43294933024935476e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-2; @@ -1328,32 +1329,32 @@ namespace madness { i = 0; exact = 5.99318492136080461e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.08696368094917623e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 2.60447168323340892e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -9.04034504985510627e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -2.14998633928712021e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 5.58835531816329497e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-1; @@ -1361,32 +1362,32 @@ namespace madness { i = 0; exact = 1.24648176437683600e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -3.27908149234218621e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.67276950422990212e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 1.64624909472826329e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 6.70688497777513430e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -9.05569878193988709e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=0; @@ -1394,32 +1395,32 @@ namespace madness { i = 0; exact = 1.24648176437683600e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 3.27908149234218621e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.67276950422990212e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -1.64624909472826329e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 6.70688497777513430e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 9.05569878193988709e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=1; @@ -1427,32 +1428,32 @@ namespace madness { i = 0; exact = 5.99318492136080461e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.08696368094917623e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 2.60447168323340892e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 9.04034504985510627e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -2.14998633928712021e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -5.58835531816329497e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=2; @@ -1460,32 +1461,32 @@ namespace madness { i = 0; exact = 1.38179858827323476e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.04763936483394230e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -8.32772220224538394e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -1.89437614141419528e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 2.88769508210870525e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.21803339122174113e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-2; @@ -1493,17 +1494,17 @@ namespace madness { i = 0; exact = 3.51365573776570017e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -4.62710590578847031e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -6.11623077961541036e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-1; @@ -1511,17 +1512,17 @@ namespace madness { i = 0; exact = 3.52439220749447890e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.55023685987324124e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -6.24931708968097842e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=0; @@ -1529,17 +1530,17 @@ namespace madness { i = 0; exact = 3.52439220749447890e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.55023685987324124e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -6.24931708968097842e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=1; @@ -1547,17 +1548,17 @@ namespace madness { i = 0; exact = 3.51365573776570017e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.62710590578847031e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -6.11623077961541036e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=2; @@ -1565,17 +1566,17 @@ namespace madness { i = 0; exact = 3.49228081923241285e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 7.63366360227468385e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -5.85369846273186721e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-2; @@ -1583,12 +1584,12 @@ namespace madness { i = 0; exact = 8.81533964065561448e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.77556865689395017e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-1; @@ -1596,12 +1597,12 @@ namespace madness { i = 0; exact = 8.81544472821516045e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -5.91867978227500295e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=0; @@ -1609,12 +1610,12 @@ namespace madness { i = 0; exact = 8.81544472821516045e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 5.91867978227500295e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=1; @@ -1622,12 +1623,12 @@ namespace madness { i = 0; exact = 8.81533964065561448e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.77556865689395017e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=2; @@ -1635,12 +1636,12 @@ namespace madness { i = 0; exact = 8.81512946929470659e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.95916350513851956e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-2; @@ -1648,12 +1649,12 @@ namespace madness { i = 0; exact = 2.20386544100369154e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -6.77341329040006257e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-1; @@ -1661,12 +1662,12 @@ namespace madness { i = 0; exact = 2.20386554362917535e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.25780460536204789e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=0; @@ -1674,12 +1675,12 @@ namespace madness { i = 0; exact = 2.20386554362917535e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.25780460536204789e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=1; @@ -1687,12 +1688,12 @@ namespace madness { i = 0; exact = 2.20386544100369154e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 6.77341329040006257e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=2; @@ -1700,12 +1701,12 @@ namespace madness { i = 0; exact = 2.20386523575273816e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.12890203983799996e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-2; @@ -1713,7 +1714,7 @@ namespace madness { i = 0; exact = 5.50966390066432148e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-1; @@ -1721,7 +1722,7 @@ namespace madness { i = 0; exact = 5.50966390166652414e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=0; @@ -1729,7 +1730,7 @@ namespace madness { i = 0; exact = 5.50966390166652414e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=1; @@ -1737,7 +1738,7 @@ namespace madness { i = 0; exact = 5.50966390066432148e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=2; @@ -1745,7 +1746,7 @@ namespace madness { i = 0; exact = 5.50966389865991790e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); } { @@ -1757,32 +1758,32 @@ namespace madness { i = 0; exact = 5.00000000000000000e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.23528272214066237e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 1.41178217654244809e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 1.26724337383508057e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 9.24808666820860048e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 5.16058662037806704e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=0; @@ -1790,32 +1791,32 @@ namespace madness { i = 0; exact = 5.00000000000000000e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.23528272214066237e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 1.41178217654244809e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -1.26724337383508057e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 9.24808666820860048e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -5.16058662037806704e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-2; @@ -1823,32 +1824,32 @@ namespace madness { i = 0; exact = 1.93406055705484376e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.39497184635340733e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 4.08935561473207502e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.66300430413872028e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.33508873895376489e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 5.08640731141814058e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=-1; @@ -1856,32 +1857,32 @@ namespace madness { i = 0; exact = 2.00000000000000000e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.34688631911635626e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -3.48488099568184218e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.62343309407099060e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.42392358397174803e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -5.74390741499019122e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=0; @@ -1889,32 +1890,32 @@ namespace madness { i = 0; exact = 2.00000000000000000e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.34688631911635626e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -3.48488099568184218e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -2.62343309407099060e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.42392358397174803e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 5.74390741499019122e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=1; @@ -1922,32 +1923,32 @@ namespace madness { i = 0; exact = 1.93406055705484376e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -4.39497184635340733e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 4.08935561473207502e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -2.66300430413872028e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.33508873895567407e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -5.08640731150656195e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-2; @@ -1955,32 +1956,32 @@ namespace madness { i = 0; exact = 2.49146408254436480e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.50647102869495280e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 2.64278820712894470e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 3.15088994971621284e-11; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -3.70274884997262088e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.02622223000723244e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-1; @@ -1988,32 +1989,32 @@ namespace madness { i = 0; exact = 3.35475425674241334e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.42579697710634181e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.61160183056987646e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 4.87550411609523399e-11; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 2.47120513789010578e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -1.86594916521298455e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=0; @@ -2021,32 +2022,32 @@ namespace madness { i = 0; exact = 3.35475425674241334e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.42579697710634181e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.61160183056987646e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -4.87550411609523399e-11; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 2.47120513789010578e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 1.86594916521298455e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=1; @@ -2054,32 +2055,32 @@ namespace madness { i = 0; exact = 2.49146408254436480e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.50647102869495280e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 2.64278820712894470e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -3.15088994971621284e-11; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -3.70274884997262088e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -2.02622223000727306e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=2; @@ -2087,32 +2088,32 @@ namespace madness { i = 0; exact = 1.37408108427214515e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.09038475936154631e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 3.68884880267772498e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 3.66150600926587787e-11; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 3.77722151485774017e-16; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -1.03592207658699442e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-2; @@ -2120,17 +2121,17 @@ namespace madness { i = 0; exact = 8.80321162122826961e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.77149821469458344e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -9.25065232468101948e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-1; @@ -2138,17 +2139,17 @@ namespace madness { i = 0; exact = 8.81371108109231360e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -5.91673982825609260e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -9.32840028258958169e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=0; @@ -2156,17 +2157,17 @@ namespace madness { i = 0; exact = 8.81371108109231360e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 5.91673982825609260e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -9.32840028258958169e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=1; @@ -2174,17 +2175,17 @@ namespace madness { i = 0; exact = 8.80321162122826961e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.77149821469458344e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -9.25065232468101948e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=2; @@ -2192,17 +2193,17 @@ namespace madness { i = 0; exact = 8.78225020949705004e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.94078061354701635e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -9.09598921287351880e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-2; @@ -2210,12 +2211,12 @@ namespace madness { i = 0; exact = 2.20385358779692841e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -6.77335257389880792e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-1; @@ -2223,12 +2224,12 @@ namespace madness { i = 0; exact = 2.20386385030982762e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.25780171409048271e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=0; @@ -2236,12 +2237,12 @@ namespace madness { i = 0; exact = 2.20386385030982762e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.25780171409048271e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=1; @@ -2249,12 +2250,12 @@ namespace madness { i = 0; exact = 2.20385358779692841e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 6.77335257389880792e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=2; @@ -2262,12 +2263,12 @@ namespace madness { i = 0; exact = 2.20383306291449504e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.12887457303027408e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-2; @@ -2275,12 +2276,12 @@ namespace madness { i = 0; exact = 5.50966378490998915e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.58385225835037511e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-1; @@ -2288,12 +2289,12 @@ namespace madness { i = 0; exact = 5.50966388513019073e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -8.61284112227903377e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=0; @@ -2301,12 +2302,12 @@ namespace madness { i = 0; exact = 5.50966388513019073e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 8.61284112227903377e-20; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=1; @@ -2314,12 +2315,12 @@ namespace madness { i = 0; exact = 5.50966378490998915e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.58385225835037511e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=2; @@ -2327,12 +2328,12 @@ namespace madness { i = 0; exact = 5.50966358446959223e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.30642016947285981e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); } { @@ -2344,32 +2345,32 @@ namespace madness { i = 0; exact = 5.00000000000000000e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.31393925175791226e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 1.76043401220533680e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.07091850787566534e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 2.28733404941548857e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.42623389685600399e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=0; @@ -2377,17 +2378,17 @@ namespace madness { i = 9; exact = -2.07091850787566534e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 2.28733404941548857e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -2.42623389685600399e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=0; @@ -2395,17 +2396,17 @@ namespace madness { i = 9; exact = -3.50842272140536116e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.68215019539905630e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -1.77563550367174916e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-2; @@ -2413,32 +2414,32 @@ namespace madness { i = 0; exact = 2.64684064677916715e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.77372027143066234e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 2.48546774012851273e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 6.34469829004409155e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 8.20364207845620860e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 5.02838600880059851e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=-1; @@ -2446,32 +2447,32 @@ namespace madness { i = 0; exact = 7.99999973531593511e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.28136988133445895e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.97337646440325010e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.42595127151247827e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -1.01342125713415232e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 1.19548791588270655e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=0; @@ -2479,32 +2480,32 @@ namespace madness { i = 0; exact = 7.99999973531593511e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.28136988133445895e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.97337646440325010e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -2.42595127151247827e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -1.01342125713415232e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -1.19548791588270655e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=1; @@ -2512,32 +2513,32 @@ namespace madness { i = 0; exact = 2.64684064677916715e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -4.77372027143066234e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 2.48546774012851273e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -6.34469829004409155e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 8.20364207845620860e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -5.02838600880059851e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-2; @@ -2545,27 +2546,27 @@ namespace madness { i = 0; exact = 7.68112666770073726e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.40335952063720378e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.16852188536233089e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.27739586876326983e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -9.64560459462787522e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-1; @@ -2573,27 +2574,27 @@ namespace madness { i = 0; exact = 8.64340268954690671e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -5.72613518237629813e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -8.32996156019435581e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 1.22452367554029254e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 3.28001683556767755e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=0; @@ -2601,27 +2602,27 @@ namespace madness { i = 0; exact = 8.64340268954690671e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 5.72613518237629813e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -8.32996156019435581e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -1.22452367554029254e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 3.28001683556767755e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=1; @@ -2629,27 +2630,27 @@ namespace madness { i = 0; exact = 7.68112666770073726e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.40335952063720378e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.16852188536233089e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -2.27739586876326983e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -9.64560459462787522e-18; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=2; @@ -2657,27 +2658,27 @@ namespace madness { i = 0; exact = 6.06603017048240378e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.52348873733158482e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 4.50962719862293780e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -9.54505770868048384e-13; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -3.34357728315444496e-17; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-2; @@ -2685,17 +2686,17 @@ namespace madness { i = 0; exact = 2.20266863365880416e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -6.76728333900617373e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.38645113252605220e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-1; @@ -2703,17 +2704,17 @@ namespace madness { i = 0; exact = 2.20369453020092898e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.25751260692224813e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.39098307532258949e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=0; @@ -2721,17 +2722,17 @@ namespace madness { i = 0; exact = 2.20369453020092898e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.25751260692224813e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.39098307532258949e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=1; @@ -2739,17 +2740,17 @@ namespace madness { i = 0; exact = 2.20266863365880416e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 6.76728333900617373e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.38645113252605220e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=2; @@ -2757,17 +2758,17 @@ namespace madness { i = 0; exact = 2.20061827312391323e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.12613077452750488e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.37740622815052894e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-2; @@ -2775,12 +2776,12 @@ namespace madness { i = 0; exact = 5.50965220949072187e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.58384321086449390e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-1; @@ -2788,12 +2789,12 @@ namespace madness { i = 0; exact = 5.50966223149730427e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -8.61283681394682842e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=0; @@ -2801,12 +2802,12 @@ namespace madness { i = 0; exact = 5.50966223149730427e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 8.61283681394682842e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=1; @@ -2814,12 +2815,12 @@ namespace madness { i = 0; exact = 5.50965220949072187e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.58384321086449390e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=2; @@ -2827,12 +2828,12 @@ namespace madness { i = 0; exact = 5.50963216553224777e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.30637924047538213e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); } { @@ -2844,32 +2845,32 @@ namespace madness { i = 0; exact = 5.00000000000000000e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.32198023075050020e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 1.79850757146013485e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.16840442140282663e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 2.47807154022197462e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.74638507267385013e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 0; l=0; @@ -2877,17 +2878,17 @@ namespace madness { i = 9; exact = -2.16840442140282663e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 2.47807154022197462e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -2.74638507267385013e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=0; @@ -2895,12 +2896,12 @@ namespace madness { i = 12; exact = 8.66639007453691868e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -8.91729870909936828e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=0; @@ -2908,17 +2909,17 @@ namespace madness { i = 9; exact = -6.97748517721321448e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.97852113142792607e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.44271302079553987e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-2; @@ -2926,32 +2927,32 @@ namespace madness { i = 0; exact = 1.77621741053728029e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.80561296694321666e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 2.14965049420876670e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.87273668988151739e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -5.78715292978526717e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 3.75446225456850381e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=-1; @@ -2959,32 +2960,32 @@ namespace madness { i = 0; exact = 3.19822378257343587e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.59910355189205866e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 1.88940266256636957e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -6.48224605439561008e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 8.95940657127647480e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -2.01590163575141197e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=0; @@ -2992,32 +2993,32 @@ namespace madness { i = 0; exact = 3.19822378257343587e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.59910355189205866e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 1.88940266256636957e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 6.48224605439561008e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 8.95940657127647480e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.01590163575141197e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=1; @@ -3025,32 +3026,32 @@ namespace madness { i = 0; exact = 1.77621741053728029e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.80561296694321666e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 2.14965049420876670e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -2.87273668988151739e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -5.78715292978526717e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -3.75446225456850381e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=2; @@ -3058,32 +3059,32 @@ namespace madness { i = 0; exact = 1.60267034903721741e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.56247390565564865e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 1.00204874077533328e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -1.68527185127306691e-11; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.32633156186227036e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -4.97857828210297353e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-2; @@ -3091,27 +3092,27 @@ namespace madness { i = 0; exact = 2.08775684768582366e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -6.18391032576240027e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -9.17718829164970323e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 7.27641771748153090e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.45035821991845720e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-1; @@ -3119,27 +3120,27 @@ namespace madness { i = 0; exact = 2.18688012530858096e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.22880079087442982e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.33180134100535050e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.89311654858050329e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 3.32835978333160121e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=0; @@ -3147,27 +3148,27 @@ namespace madness { i = 0; exact = 2.18688012530858096e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.22880079087442982e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.33180134100535050e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -2.89311654858050329e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 3.32835978333160121e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=1; @@ -3175,27 +3176,27 @@ namespace madness { i = 0; exact = 2.08775684768582366e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 6.18391032576240027e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -9.17718829164970323e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -7.27641771748153090e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 1.45035821991845720e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=2; @@ -3203,27 +3204,27 @@ namespace madness { i = 0; exact = 1.90278525861057943e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 8.78775137729619093e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.52594114788140973e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -8.24285673816764725e-14; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -1.10123909261290486e-19; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-2; @@ -3231,17 +3232,17 @@ namespace madness { i = 0; exact = 5.50849480740676434e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.58293860288335944e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.07063600559659463e-16; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-1; @@ -3249,17 +3250,17 @@ namespace madness { i = 0; exact = 5.50949687272003708e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -8.61240599236203343e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.07327540364256062e-16; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=0; @@ -3267,17 +3268,17 @@ namespace madness { i = 0; exact = 5.50949687272003708e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 8.61240599236203343e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.07327540364256062e-16; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=1; @@ -3285,17 +3286,17 @@ namespace madness { i = 0; exact = 5.50849480740676434e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.58293860288335944e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.07063600559659463e-16; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=2; @@ -3303,17 +3304,17 @@ namespace madness { i = 0; exact = 5.50649122351290821e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 4.30228801910451485e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.06536152937712491e-16; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); } { @@ -3325,32 +3326,32 @@ namespace madness { i = 0; exact = 5.00000000000000000e-01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.32278609519677226e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 1.80234849054933588e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 2.17834302709225502e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = 2.49780041123299235e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.78011463893526400e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 4; l=0; @@ -3358,12 +3359,12 @@ namespace madness { i = 12; exact = 9.85994473913733493e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -1.08963047031019240e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 8; l=0; @@ -3371,12 +3372,12 @@ namespace madness { i = 12; exact = 3.17378652019804868e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -3.10371707224047384e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 12; l=0; @@ -3384,17 +3385,17 @@ namespace madness { i = 9; exact = -3.55193478516153949e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -8.76624415465518325e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 4.45211896310375366e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-2; @@ -3402,32 +3403,32 @@ namespace madness { i = 0; exact = 3.95753699701407591e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 1.01817522582965636e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.26716664222736262e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 9.05830429656977076e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -4.09146442457520497e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.46678858892003107e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=-1; @@ -3435,32 +3436,32 @@ namespace madness { i = 0; exact = 1.24040427814888830e+02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -6.51252735045721654e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 7.18690903438790468e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -4.13584998317234614e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -1.74068139575386427e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 5.03038032706968060e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=0; @@ -3468,32 +3469,32 @@ namespace madness { i = 0; exact = 1.24040427814888830e+02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 6.51252735045721654e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 7.18690903438790468e-02; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 4.13584998317234614e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -1.74068139575386427e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -5.03038032706968060e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=1; @@ -3501,32 +3502,32 @@ namespace madness { i = 0; exact = 3.95753699701407591e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.01817522582965636e+00; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -4.26716664222736262e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -9.05830429656977076e-06; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -4.09146442457520497e-08; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = -2.46678858892003107e-10; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 16; l=2; @@ -3534,32 +3535,32 @@ namespace madness { i = 0; exact = 2.03517586076878889e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -1.49274934514448811e-03; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = 9.66085723513747846e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -9.25718189118173804e-07; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 12; exact = -1.51883153358735018e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 15; exact = 2.59891477668870922e-12; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-2; @@ -3567,22 +3568,22 @@ namespace madness { i = 0; exact = 5.39414070815156137e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -2.49387003254647314e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.78376303140302747e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 1.87233252628364406e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=-1; @@ -3590,22 +3591,22 @@ namespace madness { i = 0; exact = 5.49300601109782676e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = -8.56943996085143253e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.03858147916271143e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = 6.67700051743989307e-16; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=0; @@ -3613,22 +3614,22 @@ namespace madness { i = 0; exact = 5.49300601109782676e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 8.56943996085143253e-05; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -2.03858147916271143e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -6.67700051743989307e-16; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=1; @@ -3636,22 +3637,22 @@ namespace madness { i = 0; exact = 5.39414070815156137e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 2.49387003254647314e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.78376303140302747e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -1.87233252628364406e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); n = 20; l=2; @@ -3659,25 +3660,195 @@ namespace madness { i = 0; exact = 5.20171632178656012e+01; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 3; exact = 3.90952885279176158e-04; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 6; exact = -1.31483311173371317e-09; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); i = 9; exact = -2.71474799023069306e-15; err = abs(r(i)-exact); - //cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; + if (log_errors && err >= err_tolerance) cout << a << " " << n << " " << l << " " << i << " " << exact << " " << r(i) << " " << err << endl; maxerr = max(maxerr,err); } - //cout << "MAXERR " << maxerr << endl; - return (maxerr < 2e-13); + if (log_errors && maxerr >= err_tolerance) cout << "MAXERR " << maxerr << endl; + return (maxerr < err_tolerance); + } + + bool test_rnlp_rangelimited(const bool log_errors) { + double maxerr = 0.0; + const double pi = 3.14159265358979323846264338328; + double err; + const auto err_tolerance = 1e-13; + { + const int alog10s[] = {-4, -2, 0, 2, 4, 6, 8, 10}; + const int ps[] = {0, 3}; + const int ns[] = {0, 1, 2}; + const int ls[] = {-2, -1, 0, 1, 2}; + /// these do not include 2^{n/2} factor baked into the GaussianConvolution1D (via the multiscale adjustment of the normalization constant?) + const double exact_tr_values + [sizeof(alog10s) / sizeof(int)][sizeof(ns) / sizeof(int)] + [sizeof(ls) / sizeof(int)][sizeof(ps) / sizeof(int)] = { + {{{0, 0}, + {0.002820924410015775, -0.000932925282557223}, + {0.002820924410015775, 0.000932925282557223}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.002820924410015775, -3.331885264499784e-14}, + {0.002820924410015775, 3.331885264499784e-14}, + {0, 0}, + {0, 0}}, + {{0.001410453389628289, -3.123609897563486e-15}, + {0.001410471020387486, -1.041224991186846e-15}, + {0.001410471020387486, 1.041224991186846e-15}, + {0.001410453389628289, 3.123609897563486e-15}, + {0, 0}}}, + {{{0, 0}, + {0.02818598889850831, -0.00931386887557233}, + {0.02818598889850831, 0.00931386887557233}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.02818598889850831, -3.327307292171618e-9}, + {0.02818598889850831, 3.327307292171618e-9}, + {0, 0}, + {0, 0}}, + {{0.0140841872463443, -3.116101632173124e-10}, + {0.01410180165216401, -1.040867135941334e-10}, + {0.01410180165216401, 1.040867135941334e-10}, + {0.0140841872463443, 3.116101632173124e-10}, + {0, 0}}}, + {{{0, 0}, + {0.2602499389065233, -0.07865853072930514}, + {0.2602499389065233, 0.07865853072930514}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.2602499389065233, -0.0002901773850574695}, + {0.2602499389065233, 0.0002901773850574695}, + {0, 0}, + {0, 0}}, + {{0.1220867438224048, -0.00002440297110419346}, + {0.1381631950841185, -0.00001005737075613944}, + {0.1381631950841185, 0.00001005737075613944}, + {0.1220867438224048, 0.00002440297110419346}, + {0, 0}}}, + {{{0, 0}, + {0.4999999999992313, 0.6107567523421995}, + {0.4999999999992313, -0.6107567523421995}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.4999999999992313, 0.205938225992832}, + {0.4999999999992313, -0.205938225992832}, + {0, 0}, + {0, 0}}, + {{0.0002034760079537496, 0.0002159002695817145}, + {0.4997965239912775, -0.03888049185695126}, + {0.4997965239912775, 0.03888049185695126}, + {0.0002034760079537496, -0.0002159002695817145}, + {0, 0}}}, + {{{0, 0}, + {0.5, 1.235282722140662}, + {0.5, -1.235282722140662}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.5, 1.151568853395805}, + {0.5, -1.151568853395805}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.5, 0.995420060567129}, + {0.5, -0.995420060567129}, + {0, 0}, + {0, 0}}}, + {{{0, 0}, + {0.5, 1.313939251757912}, + {0.5, -1.313939251757912}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.5, 1.305042444690875}, + {0.5, -1.305042444690875}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.5, 1.287367262429561}, + {0.5, -1.287367262429561}, + {0, 0}, + {0, 0}}}, + {{{0, 0}, + {0.5, 1.3219802307505}, + {0.5, -1.3219802307505}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.5, 1.32108520274184}, + {0.5, -1.32108520274184}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.5, 1.319296336685672}, + {0.5, -1.319296336685672}, + {0, 0}, + {0, 0}}}, + {{{0, 0}, + {0.5, 1.322786095196772}, + {0.5, -1.322786095196772}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.5, 1.322696538829787}, + {0.5, -1.322696538829787}, + {0, 0}, + {0, 0}}, + {{0, 0}, + {0.5, 1.322517438001069}, + {0.5, -1.322517438001069}, + {0, 0}, + {0, 0}}}}; + auto ia = 0; + for (auto alog10 : alog10s) { + const auto a = pow(10., alog10); + GaussianConvolution1D tg(8, sqrt(a / pi), a, 0, false, 0., 1); + GaussianConvolution1D g(8, sqrt(a / pi), a, 0, false, 0.); + + auto in = 0; + for (auto n : ns) { + + auto il = 0; + for (auto l : ls) { + + const auto tr = tg.rnlp(n, l); + + auto ip = 0; + for (auto p : ps) { + const auto exact_tr = std::pow(M_SQRT2,n) * exact_tr_values[ia][in][il][ip]; + err = abs(tr(p) - exact_tr); + if (log_errors && err >= err_tolerance) { + cout << a << " " << n << " " << l << " " << p << " " + << exact_tr << " " << tr(p) << " " << err << endl; + } + maxerr = max(maxerr, err); + ip++; + } + il++; + } + in++; + } + ia++; + } + } + + return (maxerr < err_tolerance); } } diff --git a/src/madness/mra/testsuite.cc b/src/madness/mra/testsuite.cc index 7f0f7d1fed1..524796b2b3f 100644 --- a/src/madness/mra/testsuite.cc +++ b/src/madness/mra/testsuite.cc @@ -669,7 +669,8 @@ int test_diff(World& world) { namespace madness { - extern bool test_rnlp(); + extern bool test_rnlp(bool log_errors); + extern bool test_rnlp_rangelimited(bool log_errors); } template @@ -680,10 +681,15 @@ int test_op(World& world) { } bool ok=true; - ok=test_rnlp(); + ok=test_rnlp(true); if (world.rank()==0) { if (ok) print("test_rnlp OK"); - else print("test_rnlp FAIL"); + else print( "test_rnlp FAIL"); + } + ok=test_rnlp_rangelimited(true); + if (world.rank()==0) { + if (ok) print("test_rnlp_rangelimited OK"); + else print("test_rnlp_rangelimited FAIL"); } typedef Vector coordT;