diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 3e6db76ab..14439ad42 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -7,7 +7,7 @@ import testing ; import pch ; project - : requirements + : requirements intel-win:-nologo intel-win:-nologo #intel-linux:off diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index df45aaf82..94798e2db 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -10,8 +10,6 @@ import testing ; project : requirements - pathscale:-Wno-missing-braces - clang:-Wno-missing-braces gcc:-Wno-missing-braces darwin:-Wno-missing-braces acc:+W2068,2461,2236,4070 diff --git a/example/binomial_coinflip_example.cpp b/example/binomial_coinflip_example.cpp index bd12c7084..26410f42e 100644 --- a/example/binomial_coinflip_example.cpp +++ b/example/binomial_coinflip_example.cpp @@ -46,11 +46,10 @@ First we need some includes and using statements to be able to use the binomial #include using boost::math::binomial; -#include #include using std::cout; using std::endl; using std::left; -#include - using boost::detail::setw; +#include + using std::setw; int main() { @@ -142,7 +141,7 @@ Finally, print two tables of probability for the /exactly/ and /at least/ a numb for (int successes = 0; successes <= flips; successes++) { // Say success means getting a head (or equally success means getting a tail). double probability = pdf(flip, successes); - cout << left << boost::detail::setw(2) << successes << " " << boost::detail::setw(10) + cout << left << setw(2) << successes << " " << setw(10) << probability << " or 1 in " << 1. / probability << ", or " << probability * 100. << "%" << endl; } // for i @@ -154,7 +153,7 @@ Finally, print two tables of probability for the /exactly/ and /at least/ a numb { // Say success means getting a head // (equally success could mean getting a tail). double probability = cdf(flip, successes); // P(X <= heads) - cout << boost::detail::setw(2) << successes << " " << boost::detail::setw(10) << left + cout << setw(2) << successes << " " << setw(10) << left << probability << " or 1 in " << 1. / probability << ", or " << probability * 100. << "%"<< endl; } // for i diff --git a/example/binomial_confidence_limits.cpp b/example/binomial_confidence_limits.cpp index abc8112ae..56ab48c36 100644 --- a/example/binomial_confidence_limits.cpp +++ b/example/binomial_confidence_limits.cpp @@ -12,12 +12,11 @@ # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required. #endif -#include -#include #include using std::cout; using std::endl; -using std::fixed; using std::left; using std::right; using std::right; using boost::detail::setw; -using boost::detail::setprecision; +#include +using std::fixed; using std::left; using std::right; using std::right; using std::setw; +using std::setprecision; #include @@ -39,10 +38,10 @@ void confidence_limits_on_frequency(unsigned trials, unsigned successes) "___________________________________________\n" "2-Sided Confidence Limits For Success Ratio\n" "___________________________________________\n\n"; - cout << boost::detail::setprecision(7); - cout << boost::detail::setw(40) << left << "Number of Observations" << "= " << trials << "\n"; - cout << boost::detail::setw(40) << left << "Number of successes" << "= " << successes << "\n"; - cout << boost::detail::setw(40) << left << "Sample frequency of occurrence" << "= " << double(successes) / trials << "\n"; + cout << setprecision(7); + cout << setw(40) << left << "Number of Observations" << "= " << trials << "\n"; + cout << setw(40) << left << "Number of successes" << "= " << successes << "\n"; + cout << setw(40) << left << "Sample frequency of occurrence" << "= " << double(successes) / trials << "\n"; // // Define a table of significance levels: // @@ -61,19 +60,19 @@ void confidence_limits_on_frequency(unsigned trials, unsigned successes) for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence value: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << 100 * (1-alpha[i]); + cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]); // Calculate Clopper Pearson bounds: double l = binomial_distribution<>::find_lower_bound_on_p(trials, successes, alpha[i]/2); double u = binomial_distribution<>::find_upper_bound_on_p(trials, successes, alpha[i]/2); // Print Clopper Pearson Limits: - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << l; - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << u; + cout << fixed << setprecision(5) << setw(15) << right << l; + cout << fixed << setprecision(5) << setw(15) << right << u; // Calculate Jeffreys Prior Bounds: l = binomial_distribution<>::find_lower_bound_on_p(trials, successes, alpha[i]/2, binomial_distribution<>::jeffreys_prior_interval); u = binomial_distribution<>::find_upper_bound_on_p(trials, successes, alpha[i]/2, binomial_distribution<>::jeffreys_prior_interval); // Print Jeffreys Prior Limits: - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << l; - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << u << std::endl; + cout << fixed << setprecision(5) << setw(15) << right << l; + cout << fixed << setprecision(5) << setw(15) << right << u << std::endl; } cout << endl; } // void confidence_limits_on_frequency() diff --git a/example/binomial_example_nag.cpp b/example/binomial_example_nag.cpp index 38b996528..c1d7ee35e 100644 --- a/example/binomial_example_nag.cpp +++ b/example/binomial_example_nag.cpp @@ -16,11 +16,10 @@ #include -#include #include using std::cout; using std::endl; using std::ios; using std::showpoint; -#include - using std::fixed; using boost::detail::setw; +#include + using std::fixed; using std::setw; int main() { @@ -56,21 +55,21 @@ int main() cout << " n p k plek pgtk peqk " << endl; binomial_distribution<>my_dist(4, 0.5); - cout << boost::detail::setw(4) << (int)my_dist.trials() << " " << my_dist.success_fraction() + cout << setw(4) << (int)my_dist.trials() << " " << my_dist.success_fraction() << " " << 2 << " " << cdf(my_dist, 2) << " " << cdf(complement(my_dist, 2)) << " " << pdf(my_dist, 2) << endl; binomial_distribution<>two(19, 0.440); - cout << boost::detail::setw(4) << (int)two.trials() << " " << two.success_fraction() + cout << setw(4) << (int)two.trials() << " " << two.success_fraction() << " " << 13 << " " << cdf(two, 13) << " " << cdf(complement(two, 13)) << " " << pdf(two, 13) << endl; binomial_distribution<>three(100, 0.750); - cout << boost::detail::setw(4) << (int)three.trials() << " " << three.success_fraction() + cout << setw(4) << (int)three.trials() << " " << three.success_fraction() << " " << 67 << " " << cdf(three, 67) << " " << cdf(complement(three, 67)) << " " << pdf(three, 67) << endl; binomial_distribution<>four(2000, 0.330); - cout << boost::detail::setw(4) << (int)four.trials() << " " << four.success_fraction() + cout << setw(4) << (int)four.trials() << " " << four.success_fraction() << " " << 700 << " " << cdf(four, 700) << " " << cdf(complement(four, 700)) << " " << pdf(four, 700) << endl; diff --git a/example/binomial_quiz_example.cpp b/example/binomial_quiz_example.cpp index 30f30c7f1..2fde414b4 100644 --- a/example/binomial_quiz_example.cpp +++ b/example/binomial_quiz_example.cpp @@ -33,12 +33,11 @@ First, we need to be able to use the binomial distribution constructor #include using boost::math::binomial; -#include #include using std::cout; using std::endl; using std::ios; using std::flush; using std::left; using std::right; using std::fixed; -#include - using boost::detail::setw; using boost::detail::setprecision; +#include + using std::setw; using std::setprecision; #include using std::exception; @@ -94,7 +93,7 @@ We can tabulate the 'getting exactly right' ( == ) probabilities thus: for (int successes = 0; successes <= questions; successes++) { double probability = pdf(quiz, successes); - cout << boost::detail::setw(2) << successes << " " << probability << endl; + cout << setw(2) << successes << " " << probability << endl; } cout << endl; /*` @@ -191,7 +190,7 @@ Finally we can tabulate some probabilities: cout << "\n" "At most (<=)""\n""Guessed OK Probability" << right << endl; for (int score = 0; score <= questions; score++) { - cout << boost::detail::setw(2) << score << " " << boost::detail::setprecision(10) + cout << setw(2) << score << " " << setprecision(10) << cdf(quiz, score) << endl; } cout << endl; @@ -221,7 +220,7 @@ Guessed OK Probability cout << "\n" "At least (>)""\n""Guessed OK Probability" << right << endl; for (int score = 0; score <= questions; score++) { - cout << boost::detail::setw(2) << score << " " << boost::detail::setprecision(10) + cout << setw(2) << score << " " << setprecision(10) << cdf(complement(quiz, score)) << endl; } /*` diff --git a/example/binomial_sample_sizes.cpp b/example/binomial_sample_sizes.cpp index d3ff63041..db9f85978 100644 --- a/example/binomial_sample_sizes.cpp +++ b/example/binomial_sample_sizes.cpp @@ -12,12 +12,11 @@ # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required. #endif -#include -#include #include using std::cout; using std::endl; -using std::fixed; using std::left; using std::right; using std::right; using boost::detail::setw; -using boost::detail::setprecision; +#include +using std::fixed; using std::left; using std::right; using std::right; using std::setw; +using std::setprecision; #include @@ -41,9 +40,9 @@ void find_max_sample_size(double p, unsigned successes) "________________________\n" "Maximum Number of Trials\n" "________________________\n\n"; - cout << boost::detail::setprecision(7); - cout << boost::detail::setw(40) << left << "Success ratio" << "= " << p << "\n"; - cout << boost::detail::setw(40) << left << "Maximum Number of \"successes\" permitted" << "= " << successes << "\n"; + cout << setprecision(7); + cout << setw(40) << left << "Success ratio" << "= " << p << "\n"; + cout << setw(40) << left << "Maximum Number of \"successes\" permitted" << "= " << successes << "\n"; // // Define a table of confidence intervals: // @@ -62,12 +61,12 @@ void find_max_sample_size(double p, unsigned successes) for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence value: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << 100 * (1-alpha[i]); + cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]); // calculate trials: double t = binomial_distribution<>::find_maximum_number_of_trials(successes, p, alpha[i]); t = floor(t); // Print Trials: - cout << fixed << boost::detail::setprecision(0) << boost::detail::setw(15) << right << t << endl; + cout << fixed << setprecision(0) << setw(15) << right << t << endl; } cout << endl; } diff --git a/example/chi_square_std_dev_test.cpp b/example/chi_square_std_dev_test.cpp index 4cf6834cc..e6b195903 100644 --- a/example/chi_square_std_dev_test.cpp +++ b/example/chi_square_std_dev_test.cpp @@ -6,13 +6,12 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) -#include -#include #include using std::cout; using std::endl; using std::left; using std::fixed; using std::right; using std::scientific; -using boost::detail::setw; -using boost::detail::setprecision; +#include +using std::setw; +using std::setprecision; #include @@ -42,9 +41,9 @@ void confidence_limits_on_std_deviation( "________________________________________________\n" "2-Sided Confidence Limits For Standard Deviation\n" "________________________________________________\n\n"; - cout << boost::detail::setprecision(7); - cout << boost::detail::setw(40) << left << "Number of Observations" << "= " << N << "\n"; - cout << boost::detail::setw(40) << left << "Standard Deviation" << "= " << Sd << "\n"; + cout << setprecision(7); + cout << setw(40) << left << "Number of Observations" << "= " << N << "\n"; + cout << setw(40) << left << "Standard Deviation" << "= " << Sd << "\n"; // // Define a table of significance/risk levels: double alpha[] = { 0.5, 0.25, 0.1, 0.05, 0.01, 0.001, 0.0001, 0.00001 }; @@ -64,13 +63,13 @@ void confidence_limits_on_std_deviation( for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence value: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << 100 * (1-alpha[i]); + cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]); // Calculate limits: double lower_limit = sqrt((N - 1) * Sd * Sd / quantile(complement(dist, alpha[i] / 2))); double upper_limit = sqrt((N - 1) * Sd * Sd / quantile(dist, alpha[i] / 2)); // Print Limits: - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << lower_limit; - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << upper_limit << endl; + cout << fixed << setprecision(5) << setw(15) << right << lower_limit; + cout << fixed << setprecision(5) << setw(15) << right << upper_limit << endl; } cout << endl; } // void confidence_limits_on_std_deviation @@ -98,9 +97,9 @@ void confidence_limits_on_std_deviation_alpha( "________________________________________________\n" "2-Sided Confidence Limits For Standard Deviation\n" "________________________________________________\n\n"; - cout << boost::detail::setprecision(7); - cout << boost::detail::setw(40) << left << "Confidence level (two-sided) " << "= " << alpha << "\n"; - cout << boost::detail::setw(40) << left << "Standard Deviation" << "= " << Sd << "\n"; + cout << setprecision(7); + cout << setw(40) << left << "Confidence level (two-sided) " << "= " << alpha << "\n"; + cout << setw(40) << left << "Standard Deviation" << "= " << Sd << "\n"; cout << "\n\n" // Print table header: "_____________________________________________\n" @@ -114,13 +113,13 @@ void confidence_limits_on_std_deviation_alpha( chi_squared dist(N - 1); // Now print out the data for the table row. - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << N; + cout << fixed << setprecision(3) << setw(10) << right << N; // Calculate limits: (alpha /2 because it is a two-sided (upper and lower limit) test. double lower_limit = sqrt((N - 1) * Sd * Sd / quantile(complement(dist, alpha / 2))); double upper_limit = sqrt((N - 1) * Sd * Sd / quantile(dist, alpha / 2)); // Print Limits: - cout << fixed << boost::detail::setprecision(4) << boost::detail::setw(15) << right << lower_limit; - cout << fixed << boost::detail::setprecision(4) << boost::detail::setw(15) << right << upper_limit << endl; + cout << fixed << setprecision(4) << setw(15) << right << lower_limit; + cout << fixed << setprecision(4) << setw(15) << right << upper_limit << endl; } cout << endl; }// void confidence_limits_on_std_deviation_alpha @@ -150,53 +149,53 @@ void chi_squared_test( "______________________________________________\n" "Chi Squared test for sample standard deviation\n" "______________________________________________\n\n"; - cout << boost::detail::setprecision(5); - cout << boost::detail::setw(55) << left << "Number of Observations" << "= " << N << "\n"; - cout << boost::detail::setw(55) << left << "Sample Standard Deviation" << "= " << Sd << "\n"; - cout << boost::detail::setw(55) << left << "Expected True Standard Deviation" << "= " << D << "\n\n"; + cout << setprecision(5); + cout << setw(55) << left << "Number of Observations" << "= " << N << "\n"; + cout << setw(55) << left << "Sample Standard Deviation" << "= " << Sd << "\n"; + cout << setw(55) << left << "Expected True Standard Deviation" << "= " << D << "\n\n"; // // Now we can calculate and output some stats: // // test-statistic: double t_stat = (N - 1) * (Sd / D) * (Sd / D); - cout << boost::detail::setw(55) << left << "Test Statistic" << "= " << t_stat << "\n"; + cout << setw(55) << left << "Test Statistic" << "= " << t_stat << "\n"; // // Finally define our distribution, and get the probability: // chi_squared dist(N - 1); double p = cdf(dist, t_stat); - cout << boost::detail::setw(55) << left << "CDF of test statistic: " << "= " - << boost::detail::setprecision(3) << scientific << p << "\n"; + cout << setw(55) << left << "CDF of test statistic: " << "= " + << setprecision(3) << scientific << p << "\n"; double ucv = quantile(complement(dist, alpha)); double ucv2 = quantile(complement(dist, alpha / 2)); double lcv = quantile(dist, alpha); double lcv2 = quantile(dist, alpha / 2); - cout << boost::detail::setw(55) << left << "Upper Critical Value at alpha: " << "= " - << boost::detail::setprecision(3) << scientific << ucv << "\n"; - cout << boost::detail::setw(55) << left << "Upper Critical Value at alpha/2: " << "= " - << boost::detail::setprecision(3) << scientific << ucv2 << "\n"; - cout << boost::detail::setw(55) << left << "Lower Critical Value at alpha: " << "= " - << boost::detail::setprecision(3) << scientific << lcv << "\n"; - cout << boost::detail::setw(55) << left << "Lower Critical Value at alpha/2: " << "= " - << boost::detail::setprecision(3) << scientific << lcv2 << "\n\n"; + cout << setw(55) << left << "Upper Critical Value at alpha: " << "= " + << setprecision(3) << scientific << ucv << "\n"; + cout << setw(55) << left << "Upper Critical Value at alpha/2: " << "= " + << setprecision(3) << scientific << ucv2 << "\n"; + cout << setw(55) << left << "Lower Critical Value at alpha: " << "= " + << setprecision(3) << scientific << lcv << "\n"; + cout << setw(55) << left << "Lower Critical Value at alpha/2: " << "= " + << setprecision(3) << scientific << lcv2 << "\n\n"; // // Finally print out results of alternative hypothesis: // - cout << boost::detail::setw(55) << left << + cout << setw(55) << left << "Results for Alternative Hypothesis and alpha" << "= " - << boost::detail::setprecision(4) << fixed << alpha << "\n\n"; + << setprecision(4) << fixed << alpha << "\n\n"; cout << "Alternative Hypothesis Conclusion\n"; - cout << "Standard Deviation != " << boost::detail::setprecision(3) << fixed << D << " "; + cout << "Standard Deviation != " << setprecision(3) << fixed << D << " "; if((ucv2 < t_stat) || (lcv2 > t_stat)) cout << "NOT REJECTED\n"; else cout << "REJECTED\n"; - cout << "Standard Deviation < " << boost::detail::setprecision(3) << fixed << D << " "; + cout << "Standard Deviation < " << setprecision(3) << fixed << D << " "; if(lcv > t_stat) cout << "NOT REJECTED\n"; else cout << "REJECTED\n"; - cout << "Standard Deviation > " << boost::detail::setprecision(3) << fixed << D << " "; + cout << "Standard Deviation > " << setprecision(3) << fixed << D << " "; if(ucv < t_stat) cout << "NOT REJECTED\n"; else @@ -221,9 +220,9 @@ void chi_squared_sample_sized( "_____________________________________________________________\n" "Estimated sample sizes required for various confidence levels\n" "_____________________________________________________________\n\n"; - cout << boost::detail::setprecision(5); - cout << boost::detail::setw(40) << left << "True Variance" << "= " << variance << "\n"; - cout << boost::detail::setw(40) << left << "Difference to detect" << "= " << diff << "\n"; + cout << setprecision(5); + cout << setw(40) << left << "True Variance" << "= " << variance << "\n"; + cout << setw(40) << left << "Difference to detect" << "= " << diff << "\n"; // // Define a table of significance levels: // @@ -244,21 +243,21 @@ void chi_squared_sample_sized( for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence value: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << 100 * (1-alpha[i]); + cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]); // Calculate df for a lower single-sided test: double df = chi_squared::find_degrees_of_freedom( -diff, alpha[i], alpha[i], variance); // Convert to integral sample size (df is a floating point value in this implementation): double size = ceil(df) + 1; // Print size: - cout << fixed << boost::detail::setprecision(0) << boost::detail::setw(16) << right << size; + cout << fixed << setprecision(0) << setw(16) << right << size; // Calculate df for an upper single-sided test: df = chi_squared::find_degrees_of_freedom( diff, alpha[i], alpha[i], variance); // Convert to integral sample size: size = ceil(df) + 1; // Print size: - cout << fixed << boost::detail::setprecision(0) << boost::detail::setw(16) << right << size << endl; + cout << fixed << setprecision(0) << setw(16) << right << size << endl; } cout << endl; } diff --git a/example/f_test.cpp b/example/f_test.cpp index 0c5aaf551..f7fabdee3 100644 --- a/example/f_test.cpp +++ b/example/f_test.cpp @@ -13,13 +13,12 @@ # pragma warning(disable: 4180) // qualifier has no effect (in Fusion). #endif -#include -#include #include using std::cout; using std::endl; using std::left; using std::fixed; using std::right; using std::scientific; -using boost::detail::setw; -using boost::detail::setprecision; +#include +using std::setw; +using std::setprecision; #include @@ -47,45 +46,45 @@ void f_test( "____________________________________\n" "F test for equal standard deviations\n" "____________________________________\n\n"; - cout << boost::detail::setprecision(5); + cout << setprecision(5); cout << "Sample 1:\n"; - cout << boost::detail::setw(55) << left << "Number of Observations" << "= " << N1 << "\n"; - cout << boost::detail::setw(55) << left << "Sample Standard Deviation" << "= " << sd1 << "\n\n"; + cout << setw(55) << left << "Number of Observations" << "= " << N1 << "\n"; + cout << setw(55) << left << "Sample Standard Deviation" << "= " << sd1 << "\n\n"; cout << "Sample 2:\n"; - cout << boost::detail::setw(55) << left << "Number of Observations" << "= " << N2 << "\n"; - cout << boost::detail::setw(55) << left << "Sample Standard Deviation" << "= " << sd2 << "\n\n"; + cout << setw(55) << left << "Number of Observations" << "= " << N2 << "\n"; + cout << setw(55) << left << "Sample Standard Deviation" << "= " << sd2 << "\n\n"; // // Now we can calculate and output some stats: // // F-statistic: double F = (sd1 / sd2); F *= F; - cout << boost::detail::setw(55) << left << "Test Statistic" << "= " << F << "\n\n"; + cout << setw(55) << left << "Test Statistic" << "= " << F << "\n\n"; // // Finally define our distribution, and get the probability: // fisher_f dist(N1 - 1, N2 - 1); double p = cdf(dist, F); - cout << boost::detail::setw(55) << left << "CDF of test statistic: " << "= " - << boost::detail::setprecision(3) << scientific << p << "\n"; + cout << setw(55) << left << "CDF of test statistic: " << "= " + << setprecision(3) << scientific << p << "\n"; double ucv = quantile(complement(dist, alpha)); double ucv2 = quantile(complement(dist, alpha / 2)); double lcv = quantile(dist, alpha); double lcv2 = quantile(dist, alpha / 2); - cout << boost::detail::setw(55) << left << "Upper Critical Value at alpha: " << "= " - << boost::detail::setprecision(3) << scientific << ucv << "\n"; - cout << boost::detail::setw(55) << left << "Upper Critical Value at alpha/2: " << "= " - << boost::detail::setprecision(3) << scientific << ucv2 << "\n"; - cout << boost::detail::setw(55) << left << "Lower Critical Value at alpha: " << "= " - << boost::detail::setprecision(3) << scientific << lcv << "\n"; - cout << boost::detail::setw(55) << left << "Lower Critical Value at alpha/2: " << "= " - << boost::detail::setprecision(3) << scientific << lcv2 << "\n\n"; + cout << setw(55) << left << "Upper Critical Value at alpha: " << "= " + << setprecision(3) << scientific << ucv << "\n"; + cout << setw(55) << left << "Upper Critical Value at alpha/2: " << "= " + << setprecision(3) << scientific << ucv2 << "\n"; + cout << setw(55) << left << "Lower Critical Value at alpha: " << "= " + << setprecision(3) << scientific << lcv << "\n"; + cout << setw(55) << left << "Lower Critical Value at alpha/2: " << "= " + << setprecision(3) << scientific << lcv2 << "\n\n"; // // Finally print out results of null and alternative hypothesis: // - cout << boost::detail::setw(55) << left << + cout << setw(55) << left << "Results for Alternative Hypothesis and alpha" << "= " - << boost::detail::setprecision(4) << fixed << alpha << "\n\n"; + << setprecision(4) << fixed << alpha << "\n\n"; cout << "Alternative Hypothesis Conclusion\n"; cout << "Standard deviations are unequal (two sided test) "; if((ucv2 < F) || (lcv2 > F)) diff --git a/example/find_location_example.cpp b/example/find_location_example.cpp index 9f9208a5d..97c5302a5 100644 --- a/example/find_location_example.cpp +++ b/example/find_location_example.cpp @@ -36,8 +36,8 @@ the algorithms to find location (and some std output of course). #include using std::cout; using std::endl; -#include - using boost::detail::setw; using boost::detail::setprecision; +#include + using std::setw; using std::setprecision; #include using std::numeric_limits; diff --git a/example/find_mean_and_sd_normal.cpp b/example/find_mean_and_sd_normal.cpp index c4f0ecc5b..9a09c7a8c 100644 --- a/example/find_mean_and_sd_normal.cpp +++ b/example/find_mean_and_sd_normal.cpp @@ -30,11 +30,10 @@ the algorithms to find location and scale using boost::math::complement; using boost::math::policies::policy; -#include #include using std::cout; using std::endl; using std::left; using std::showpoint; using std::noshowpoint; -#include - using boost::detail::setw; using boost::detail::setprecision; +#include + using std::setw; using std::setprecision; #include using std::numeric_limits; #include diff --git a/example/find_root_example.cpp b/example/find_root_example.cpp index ade2b80b3..65b2f3b97 100644 --- a/example/find_root_example.cpp +++ b/example/find_root_example.cpp @@ -23,11 +23,10 @@ First we need some includes to access the normal distribution #include // for normal_distribution using boost::math::normal; // typedef provides default type is double. -#include #include using std::cout; using std::endl; using std::left; using std::showpoint; using std::noshowpoint; -#include - using boost::detail::setw; using boost::detail::setprecision; +#include + using std::setw; using std::setprecision; #include using std::numeric_limits; #include diff --git a/example/find_scale_example.cpp b/example/find_scale_example.cpp index 53d2f576a..b3b42b468 100644 --- a/example/find_scale_example.cpp +++ b/example/find_scale_example.cpp @@ -27,8 +27,8 @@ the algorithms to find scale (and some std output of course). #include using std::cout; using std::endl; -#include - using boost::detail::setw; using boost::detail::setprecision; +#include + using std::setw; using std::setprecision; #include using std::numeric_limits; //] [/find_scale1] diff --git a/example/geometric_examples.cpp b/example/geometric_examples.cpp index 9b0ee2523..410b4d980 100644 --- a/example/geometric_examples.cpp +++ b/example/geometric_examples.cpp @@ -48,12 +48,11 @@ and we need some std library iostream, of course. // for negative_binomial_distribution using boost::math::normal; // typedef provides default type is double. -#include #include using std::cout; using std::endl; using std::noshowpoint; using std::fixed; using std::right; using std::left; -#include - using boost::detail::setprecision; using boost::detail::setw; +#include + using std::setprecision; using std::setw; #include using std::numeric_limits; diff --git a/example/inverse_chi_squared_example.cpp b/example/inverse_chi_squared_example.cpp index 83eee6d3a..717046022 100644 --- a/example/inverse_chi_squared_example.cpp +++ b/example/inverse_chi_squared_example.cpp @@ -15,9 +15,9 @@ using boost::math::inverse_chi_squared; //typedef for nverse_chi_squared_distrib #include using std::cout; using std::endl; -#include -using boost::detail::setprecision; -using boost::detail::setw; +#include +using std::setprecision; +using std::setw; #include using std::sqrt; @@ -120,15 +120,15 @@ int main() for (double x = 0.0; x < 1.; x += 0.1) { cout - << boost::detail::setw(width) << x - << ' ' << boost::detail::setw(width) << pdf(ichsq, x) // unscaled - << ' ' << boost::detail::setw(width) << naive_pdf1(nu, x) // Wiki def 1 unscaled matches graph - << ' ' << boost::detail::setw(width) << naive_pdf2(nu, x) // scale = 1 - 2nd definition. - << ' ' << boost::detail::setw(width) << naive_pdf3(nu, 1/nu, x) // scaled - << ' ' << boost::detail::setw(width) << naive_pdf4(nu, 1/nu, x) // scaled - << ' ' << boost::detail::setw(width) << pdf(sichsq, x) // scaled - << ' ' << boost::detail::setw(width) << cdf(sichsq, x) // scaled - << ' ' << boost::detail::setw(width) << cdf(ichsq, x) // unscaled + << setw(width) << x + << ' ' << setw(width) << pdf(ichsq, x) // unscaled + << ' ' << setw(width) << naive_pdf1(nu, x) // Wiki def 1 unscaled matches graph + << ' ' << setw(width) << naive_pdf2(nu, x) // scale = 1 - 2nd definition. + << ' ' << setw(width) << naive_pdf3(nu, 1/nu, x) // scaled + << ' ' << setw(width) << naive_pdf4(nu, 1/nu, x) // scaled + << ' ' << setw(width) << pdf(sichsq, x) // scaled + << ' ' << setw(width) << cdf(sichsq, x) // scaled + << ' ' << setw(width) << cdf(ichsq, x) // unscaled << endl; } } diff --git a/example/inverse_chi_squared_find_df_example.cpp b/example/inverse_chi_squared_find_df_example.cpp index ac3ad1ab9..ea0f932dc 100644 --- a/example/inverse_chi_squared_find_df_example.cpp +++ b/example/inverse_chi_squared_find_df_example.cpp @@ -17,9 +17,9 @@ using boost::math::inverse_chi_squared; //typedef for nverse_chi_squared_distrib #include using std::cout; using std::endl; -#include -using boost::detail::setprecision; -using boost::detail::setw; +#include +using std::setprecision; +using std::setw; #include using std::sqrt; diff --git a/example/inverse_gamma_distribution_example.cpp b/example/inverse_gamma_distribution_example.cpp index 16d1e266f..147c8084c 100644 --- a/example/inverse_gamma_distribution_example.cpp +++ b/example/inverse_gamma_distribution_example.cpp @@ -21,8 +21,8 @@ using boost::math::inverse_gamma_distribution; #include using std::cout; using std::endl; -#include -using boost::detail::setprecision; +#include +using std::setprecision; #include using std::sqrt; diff --git a/example/inverse_gamma_example.cpp b/example/inverse_gamma_example.cpp index 1952f2646..91495e794 100644 --- a/example/inverse_gamma_example.cpp +++ b/example/inverse_gamma_example.cpp @@ -18,8 +18,8 @@ using boost::math::gamma_p_inv; // Compute x given a #include using std::cout; using std::endl; -#include - using boost::detail::setprecision; +#include + using std::setprecision; #include using std::sqrt; #include diff --git a/example/inverse_gaussian_example.cpp b/example/inverse_gaussian_example.cpp index 2c48d55f8..155b531b7 100644 --- a/example/inverse_gaussian_example.cpp +++ b/example/inverse_gaussian_example.cpp @@ -45,17 +45,16 @@ using boost::math::normal; // typedef provides default type is double. #include using boost::array; -#include #include using std::cout; using std::endl; using std::left; using std::showpoint; using std::noshowpoint; -#include - using boost::detail::setw; using boost::detail::setprecision; +#include + using std::setw; using std::setprecision; #include using std::numeric_limits; #include - using std::stringstream; -#include using std::string; +#include + using std::stringstream; // const double tol = 3 * numeric_limits::epsilon(); diff --git a/example/laplace_example.cpp b/example/laplace_example.cpp index 47111e9b7..ed99dba21 100644 --- a/example/laplace_example.cpp +++ b/example/laplace_example.cpp @@ -23,11 +23,10 @@ First we need some includes to access the laplace & normal distributions #include // for normal_distribution using boost::math::normal; // typedef provides default type is double. -#include #include using std::cout; using std::endl; using std::left; using std::showpoint; using std::noshowpoint; -#include - using boost::detail::setw; using boost::detail::setprecision; +#include + using std::setw; using std::setprecision; #include using std::numeric_limits; @@ -44,7 +43,7 @@ int main() double range = 4; // min and max z = -range to +range. //int precision = 17; // traditional tables are only computed to much lower precision. int precision = 4; // traditional table at much lower precision. - int width = 10; // for use with boost::detail::setw. + int width = 10; // for use with setw. // Construct standard laplace & normal distributions l & s normal s; // (default location or mean = zero, and scale or standard deviation = unity) @@ -61,10 +60,10 @@ int main() cout.precision(5); for (double z = -range; z < range + step; z += step) { - cout << left << boost::detail::setprecision(3) << boost::detail::setw(6) << z << " " - << boost::detail::setprecision(precision) << boost::detail::setw(width) << pdf(s, z) << " " - << boost::detail::setprecision(precision) << boost::detail::setw(width) << pdf(l, z)<< " (" - << boost::detail::setprecision(precision) << boost::detail::setw(width) << pdf(l, z) - pdf(s, z) // difference. + cout << left << setprecision(3) << setw(6) << z << " " + << setprecision(precision) << setw(width) << pdf(s, z) << " " + << setprecision(precision) << setw(width) << pdf(l, z)<< " (" + << setprecision(precision) << setw(width) << pdf(l, z) - pdf(s, z) // difference. << ")" << endl; } cout.precision(6); // default @@ -80,10 +79,10 @@ int main() cout << " z CDF normal laplace (difference)" << endl; for (double z = -range; z < range + step; z += step) { - cout << left << boost::detail::setprecision(3) << boost::detail::setw(6) << z << " " - << boost::detail::setprecision(precision) << boost::detail::setw(width) << cdf(s, z) << " " - << boost::detail::setprecision(precision) << boost::detail::setw(width) << cdf(l, z) << " (" - << boost::detail::setprecision(precision) << boost::detail::setw(width) << cdf(l, z) - cdf(s, z) // difference. + cout << left << setprecision(3) << setw(6) << z << " " + << setprecision(precision) << setw(width) << cdf(s, z) << " " + << setprecision(precision) << setw(width) << cdf(l, z) << " (" + << setprecision(precision) << setw(width) << cdf(l, z) - cdf(s, z) // difference. << ")" << endl; } cout.precision(6); // default diff --git a/example/nc_chi_sq_example.cpp b/example/nc_chi_sq_example.cpp index 99372f0d2..189badd01 100644 --- a/example/nc_chi_sq_example.cpp +++ b/example/nc_chi_sq_example.cpp @@ -30,8 +30,7 @@ using boost::math::non_central_chi_squared; #include using std::cout; using std::endl; -#include -using boost::detail::setprecision; +using std::setprecision; int main() { @@ -70,7 +69,7 @@ int main() /*` Then output the cell value: */ - cout << "[" << boost::detail::setprecision(3) << beta << "]"; + cout << "[" << setprecision(3) << beta << "]"; } cout << "]" << endl; } diff --git a/example/neg_binom_confidence_limits.cpp b/example/neg_binom_confidence_limits.cpp index 67b855320..4cb11a3d7 100644 --- a/example/neg_binom_confidence_limits.cpp +++ b/example/neg_binom_confidence_limits.cpp @@ -22,12 +22,11 @@ First we need some includes to access the negative binomial distribution #include using boost::math::negative_binomial; -#include #include using std::cout; using std::endl; -#include -using boost::detail::setprecision; -using boost::detail::setw; using std::left; using std::fixed; using std::right; +#include +using std::setprecision; +using std::setw; using std::left; using std::fixed; using std::right; /*` First define a table of significance levels: these are the @@ -58,11 +57,11 @@ void confidence_limits_on_frequency(unsigned trials, unsigned successes) "______________________________________________\n" "2-Sided Confidence Limits For Success Fraction\n" "______________________________________________\n\n"; - cout << boost::detail::setprecision(7); - cout << boost::detail::setw(40) << left << "Number of trials" << " = " << trials << "\n"; - cout << boost::detail::setw(40) << left << "Number of successes" << " = " << successes << "\n"; - cout << boost::detail::setw(40) << left << "Number of failures" << " = " << trials - successes << "\n"; - cout << boost::detail::setw(40) << left << "Observed frequency of occurrence" << " = " << double(successes) / trials << "\n"; + cout << setprecision(7); + cout << setw(40) << left << "Number of trials" << " = " << trials << "\n"; + cout << setw(40) << left << "Number of successes" << " = " << successes << "\n"; + cout << setw(40) << left << "Number of failures" << " = " << trials - successes << "\n"; + cout << setw(40) << left << "Observed frequency of occurrence" << " = " << double(successes) / trials << "\n"; // Print table header: cout << "\n\n" @@ -87,13 +86,13 @@ then we would *not* have divided by two. for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence value: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << 100 * (1-alpha[i]); + cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]); // Calculate bounds: double lower = negative_binomial::find_lower_bound_on_p(trials, successes, alpha[i]/2); double upper = negative_binomial::find_upper_bound_on_p(trials, successes, alpha[i]/2); // Print limits: - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << lower; - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << upper << endl; + cout << fixed << setprecision(5) << setw(15) << right << lower; + cout << fixed << setprecision(5) << setw(15) << right << upper << endl; } cout << endl; } // void confidence_limits_on_frequency(unsigned trials, unsigned successes) diff --git a/example/neg_binomial_sample_sizes.cpp b/example/neg_binomial_sample_sizes.cpp index c64157f70..d01089e9d 100644 --- a/example/neg_binomial_sample_sizes.cpp +++ b/example/neg_binomial_sample_sizes.cpp @@ -17,15 +17,14 @@ double k, // number of failures (events), k >= 0. double p, // fraction of trails for which event occurs, 0 <= p <= 1. double probability); // probability threshold, 0 <= probability <= 1. -#include #include using std::cout; using std::endl; using std::fixed; using std::right; -#include -using boost::detail::setprecision; -using boost::detail::setw; +#include +using std::setprecision; +using std::setw; //[neg_binomial_sample_sizes @@ -65,7 +64,7 @@ void find_number_of_trials(double failures, double p) // required number of failures DOES exceed "failures". cout << "\n""Target number of failures = " << (int)failures; - cout << ", Success fraction = " << fixed << boost::detail::setprecision(1) << 100 * p << "%" << endl; + cout << ", Success fraction = " << fixed << setprecision(1) << 100 * p << "%" << endl; // Print table header: cout << "____________________________\n" "Confidence Min Number\n" @@ -74,9 +73,9 @@ void find_number_of_trials(double failures, double p) // Now print out the data for the alpha table values. for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence values %: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << 100 * (1-alpha[i]) << " " + cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]) << " " // find_minimum_number_of_trials - << boost::detail::setw(6) << right + << setw(6) << right << (int)ceil(negative_binomial::find_minimum_number_of_trials(failures, p, alpha[i])) << endl; } diff --git a/example/negative_binomial_example1.cpp b/example/negative_binomial_example1.cpp index f02554591..928811d09 100644 --- a/example/negative_binomial_example1.cpp +++ b/example/negative_binomial_example1.cpp @@ -59,12 +59,11 @@ and we need some std library iostream, of course. using ::boost::math::cdf; // Cumulative density function. using ::boost::math::quantile; -#include #include using std::cout; using std::endl; using std::noshowpoint; using std::fixed; using std::right; using std::left; -#include - using boost::detail::setprecision; using boost::detail::setw; +#include + using std::setprecision; using std::setw; #include using std::numeric_limits; @@ -376,7 +375,7 @@ Finally, we can tabulate the probability for the last sale being exactly on each cout.precision(5); for (int i = (int)sales_quota; i < all_houses+1; i++) { - cout << left << boost::detail::setw(3) << i << " " << boost::detail::setw(8) << cdf(nb, i - sales_quota) << endl; + cout << left << setw(3) << i << " " << setw(8) << cdf(nb, i - sales_quota) << endl; } cout << endl; /*` diff --git a/example/negative_binomial_example2.cpp b/example/negative_binomial_example2.cpp index 155c0029a..601180c34 100644 --- a/example/negative_binomial_example2.cpp +++ b/example/negative_binomial_example2.cpp @@ -19,14 +19,12 @@ // negative_binomial is the probability that k or fewer failures // preceed the r th trial's success. -#include #include -#include using std::cout; using std::endl; -using boost::detail::setprecision; +using std::setprecision; using std::showpoint; -using boost::detail::setw; +using std::setw; using std::left; using std::right; #include @@ -65,10 +63,10 @@ int main() // Compare with the cdf double cdf8 = cdf(mynbdist, static_cast(k)); double diff = sum - cdf8; // Expect the diference to be very small. - cout << boost::detail::setprecision(17) << "Sum pdfs = " << sum << ' ' // sum = 0.40025683281803698 + cout << setprecision(17) << "Sum pdfs = " << sum << ' ' // sum = 0.40025683281803698 << ", cdf = " << cdf(mynbdist, static_cast(k)) // cdf = 0.40025683281803687 << ", difference = " // difference = 0.50000000000000000 - << boost::detail::setprecision(1) << diff/ (std::numeric_limits::epsilon() * sum) + << setprecision(1) << diff/ (std::numeric_limits::epsilon() * sum) << " in epsilon units." << endl; // Note: Use boost::math::tools::epsilon rather than std::numeric_limits @@ -87,10 +85,10 @@ int main() cout << "\n"" k pdf cdf""\n" << endl; for (int k = 0; k < maxk; k++) { - cout << right << boost::detail::setprecision(17) << showpoint - << right << boost::detail::setw(3) << k << ", " - << left << boost::detail::setw(25) << pdf(mynbdist, static_cast(k)) - << left << boost::detail::setw(25) << cdf(mynbdist, static_cast(k)) + cout << right << setprecision(17) << showpoint + << right << setw(3) << k << ", " + << left << setw(25) << pdf(mynbdist, static_cast(k)) + << left << setw(25) << cdf(mynbdist, static_cast(k)) << endl; } cout << endl; diff --git a/example/normal_misc_examples.cpp b/example/normal_misc_examples.cpp index 531d2d097..4503847dd 100644 --- a/example/normal_misc_examples.cpp +++ b/example/normal_misc_examples.cpp @@ -21,11 +21,10 @@ First we need some includes to access the normal distribution #include // for normal_distribution using boost::math::normal; // typedef provides default type is double. -#include #include using std::cout; using std::endl; using std::left; using std::showpoint; using std::noshowpoint; -#include - using boost::detail::setw; using boost::detail::setprecision; +#include + using std::setw; using std::setprecision; #include using std::numeric_limits; @@ -58,8 +57,8 @@ int main() cout.precision(5); for (double z = -range; z < range + step; z += step) { - cout << left << boost::detail::setprecision(3) << boost::detail::setw(6) << z << " " - << boost::detail::setprecision(precision) << boost::detail::setw(12) << pdf(s, z) << endl; + cout << left << setprecision(3) << setw(6) << z << " " + << setprecision(precision) << setw(12) << pdf(s, z) << endl; } cout.precision(6); // default /*`And the area under the normal curve from -[infin] up to z, @@ -72,8 +71,8 @@ int main() cout << " z " " cdf " << endl; for (double z = -range; z < range + step; z += step) { - cout << left << boost::detail::setprecision(3) << boost::detail::setw(6) << z << " " - << boost::detail::setprecision(precision) << boost::detail::setw(12) << cdf(s, z) << endl; + cout << left << setprecision(3) << setw(6) << z << " " + << setprecision(precision) << setw(12) << cdf(s, z) << endl; } cout.precision(6); // default @@ -111,7 +110,7 @@ It is convenient to have an alpha level for the probability that z lies outside This will not be some nice neat number like 0.05, but we can easily calculate it, */ double alpha1 = cdf(s, -1) * 2; // 0.3173105078629142 - cout << boost::detail::setprecision(17) << "Significance level for z == 1 is " << alpha1 << endl; + cout << setprecision(17) << "Significance level for z == 1 is " << alpha1 << endl; /*` and place in our array of favorite alpha values. */ @@ -123,11 +122,11 @@ Confidence value as % is (1 - alpha) * 100 (so alpha 0.05 == 95% confidence) that the true occurrence frequency lies *inside* the calculated interval. */ - cout << "level of significance (alpha)" << boost::detail::setprecision(4) << endl; + cout << "level of significance (alpha)" << setprecision(4) << endl; cout << "2-sided 1 -sided z(alpha) " << endl; for (int i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { - cout << boost::detail::setw(15) << alpha[i] << boost::detail::setw(15) << alpha[i] /2 << boost::detail::setw(10) << quantile(complement(s, alpha[i]/2)) << endl; + cout << setw(15) << alpha[i] << setw(15) << alpha[i] /2 << setw(10) << quantile(complement(s, alpha[i]/2)) << endl; // Use quantile(complement(s, alpha[i]/2)) to avoid potential loss of accuracy from quantile(s, 1 - alpha[i]/2) } cout << endl; diff --git a/example/policy_eg_10.cpp b/example/policy_eg_10.cpp index 22f96f7ae..87f84c090 100644 --- a/example/policy_eg_10.cpp +++ b/example/policy_eg_10.cpp @@ -20,13 +20,12 @@ all the possible quantiles at 0.05 and 0.95. Begin by including the needed headers (and some using statements for conciseness): */ -#include #include using std::cout; using std::endl; using std::left; using std::fixed; using std::right; using std::scientific; -#include -using boost::detail::setw; -using boost::detail::setprecision; +#include +using std::setw; +using std::setprecision; #include /*` @@ -97,62 +96,62 @@ int main() "Lower quantiles are calculated at p = 0.05\n\n" "Upper quantiles at p = 0.95.\n\n"; - cout << boost::detail::setw(25) << right - << "Policy"<< boost::detail::setw(18) << right - << "Lower Quantile" << boost::detail::setw(18) << right + cout << setw(25) << right + << "Policy"<< setw(18) << right + << "Lower Quantile" << setw(18) << right << "Upper Quantile" << endl; // Test integer_round_outwards: - cout << boost::detail::setw(25) << right + cout << setw(25) << right << "integer_round_outwards" - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_outwards(50, 0.5), 0.05) - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_outwards(50, 0.5), 0.95) << endl; // Test integer_round_inwards: - cout << boost::detail::setw(25) << right + cout << setw(25) << right << "integer_round_inwards" - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_inwards(50, 0.5), 0.05) - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_inwards(50, 0.5), 0.95) << endl; // Test integer_round_down: - cout << boost::detail::setw(25) << right + cout << setw(25) << right << "integer_round_down" - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_down(50, 0.5), 0.05) - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_down(50, 0.5), 0.95) << endl; // Test integer_round_up: - cout << boost::detail::setw(25) << right + cout << setw(25) << right << "integer_round_up" - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_up(50, 0.5), 0.05) - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_up(50, 0.5), 0.95) << endl; // Test integer_round_nearest: - cout << boost::detail::setw(25) << right + cout << setw(25) << right << "integer_round_nearest" - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_nearest(50, 0.5), 0.05) - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_round_nearest(50, 0.5), 0.95) << endl; // Test real: - cout << boost::detail::setw(25) << right + cout << setw(25) << right << "real" - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_real_quantile(50, 0.5), 0.05) - << boost::detail::setw(18) << right + << setw(18) << right << quantile(binom_real_quantile(50, 0.5), 0.95) << endl; } // int main() diff --git a/example/policy_eg_9.cpp b/example/policy_eg_9.cpp index 2a558d4a6..98234c29e 100644 --- a/example/policy_eg_9.cpp +++ b/example/policy_eg_9.cpp @@ -7,7 +7,6 @@ // Note that this file contains quickbook mark-up as well as code // and comments, don't change any of the special comment mark-ups! -#include #include using std::cout; using std::endl; using std::cerr; @@ -84,7 +83,7 @@ T user_domain_error(const char* function, const char* message, const T& val) msg += ": \n"; int prec = 2 + (std::numeric_limits::digits * 30103UL) / 100000UL; // int prec = std::numeric_limits::max_digits10; // For C++0X Standard Library - msg += (boost::format(message) % boost::io::group(boost::detail::setprecision(prec), val)).str(); + msg += (boost::format(message) % boost::io::group(std::setprecision(prec), val)).str(); /*` Now we just have to do something with the message, we could throw an exception, but for the purposes of this example we'll just dump the message @@ -202,7 +201,7 @@ T user_evaluation_error(const char* function, const char* message, const T& val) msg += ": \n"; int prec = 2 + (std::numeric_limits::digits * 30103UL) / 100000UL; // int prec = std::numeric_limits::max_digits10; // For C++0X Standard Library - msg += (boost::format(message) % boost::io::group(boost::detail::setprecision(prec), val)).str(); + msg += (boost::format(message) % boost::io::group(std::setprecision(prec), val)).str(); std::cerr << msg << std::endl; diff --git a/example/root_finding_example.cpp b/example/root_finding_example.cpp index a1f862e46..5829d981c 100644 --- a/example/root_finding_example.cpp +++ b/example/root_finding_example.cpp @@ -51,8 +51,8 @@ using boost::math::tools::toms748_solve; #include using std::cout; using std::endl; -#include -using boost::detail::setw; using boost::detail::setprecision; +#include +using std::setw; using std::setprecision; #include using std::numeric_limits; diff --git a/example/students_t_example1.cpp b/example/students_t_example1.cpp index 94c857de3..c86b89d5d 100644 --- a/example/students_t_example1.cpp +++ b/example/students_t_example1.cpp @@ -47,8 +47,8 @@ double value[values] = {38.9, 37.4, 37.1}; #include using std::cout; using std::endl; -#include - using boost::detail::setprecision; +#include + using std::setprecision; #include using std::sqrt; diff --git a/example/students_t_example2.cpp b/example/students_t_example2.cpp index 9b1109246..bbd423162 100644 --- a/example/students_t_example2.cpp +++ b/example/students_t_example2.cpp @@ -35,9 +35,9 @@ #include using std::cout; using std::endl; -#include - using boost::detail::setprecision; - using boost::detail::setw; +#include + using std::setprecision; + using std::setw; #include using std::sqrt; @@ -68,7 +68,7 @@ int main() for (int value = 0; value < values; value++) { // Echo data and calculate mean. sum += data[value]; - cout << boost::detail::setw(4) << value << ' ' << boost::detail::setw(14) << data[value] << endl; + cout << setw(4) << value << ' ' << setw(14) << data[value] << endl; } double mean = sum /static_cast(values); cout << "Mean = " << mean << endl; // 25.2283 diff --git a/example/students_t_example3.cpp b/example/students_t_example3.cpp index 0572ef481..289daec09 100644 --- a/example/students_t_example3.cpp +++ b/example/students_t_example3.cpp @@ -34,8 +34,8 @@ #include using std::cout; using std::endl; -#include - using boost::detail::setprecision; using boost::detail::setw; +#include + using std::setprecision; using std::setw; #include using std::sqrt; @@ -71,7 +71,7 @@ int main() { // Echo data and differences. diffs[portion] = data[portion][0] - data[portion][1]; mean_diff += diffs[portion]; - cout << boost::detail::setw(4) << portion << ' ' << boost::detail::setw(14) << data[portion][0] << ' ' << boost::detail::setw(18)<< data[portion][1] << ' ' << boost::detail::setw(9) << diffs[portion] << endl; + cout << setw(4) << portion << ' ' << setw(14) << data[portion][0] << ' ' << setw(18)<< data[portion][1] << ' ' << setw(9) << diffs[portion] << endl; } mean_diff /= portions; cout << "Mean difference = " << mean_diff << endl; // -1.75 diff --git a/example/students_t_single_sample.cpp b/example/students_t_single_sample.cpp index ac8473966..84138b9a0 100644 --- a/example/students_t_single_sample.cpp +++ b/example/students_t_single_sample.cpp @@ -16,13 +16,12 @@ // avoid "using namespace std;" and "using namespace boost::math;" // to avoid potential ambiguity with names in std random. -#include #include using std::cout; using std::endl; using std::left; using std::fixed; using std::right; using std::scientific; -#include -using boost::detail::setw; -using boost::detail::setprecision; +#include +using std::setw; +using std::setprecision; void confidence_limits_on_mean(double Sm, double Sd, unsigned Sn) { @@ -50,10 +49,10 @@ void confidence_limits_on_mean(double Sm, double Sd, unsigned Sn) "__________________________________\n" "2-Sided Confidence Limits For Mean\n" "__________________________________\n\n"; - cout << boost::detail::setprecision(7); - cout << boost::detail::setw(40) << left << "Number of Observations" << "= " << Sn << "\n"; - cout << boost::detail::setw(40) << left << "Mean" << "= " << Sm << "\n"; - cout << boost::detail::setw(40) << left << "Standard Deviation" << "= " << Sd << "\n"; + cout << setprecision(7); + cout << setw(40) << left << "Number of Observations" << "= " << Sn << "\n"; + cout << setw(40) << left << "Mean" << "= " << Sm << "\n"; + cout << setw(40) << left << "Standard Deviation" << "= " << Sd << "\n"; // // Define a table of significance/risk levels: // @@ -76,21 +75,21 @@ void confidence_limits_on_mean(double Sm, double Sd, unsigned Sn) for(unsigned i = 0; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence value: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << 100 * (1-alpha[i]); + cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]); // calculate T: double T = quantile(complement(dist, alpha[i] / 2)); // Print T: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << T; + cout << fixed << setprecision(3) << setw(10) << right << T; // Calculate width of interval (one sided): double w = T * Sd / sqrt(double(Sn)); // Print width: if(w < 0.01) - cout << scientific << boost::detail::setprecision(3) << boost::detail::setw(17) << right << w; + cout << scientific << setprecision(3) << setw(17) << right << w; else - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(17) << right << w; + cout << fixed << setprecision(3) << setw(17) << right << w; // Print Limits: - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << Sm - w; - cout << fixed << boost::detail::setprecision(5) << boost::detail::setw(15) << right << Sm + w << endl; + cout << fixed << setprecision(5) << setw(15) << right << Sm - w; + cout << fixed << setprecision(5) << setw(15) << right << Sm + w << endl; } cout << endl; } // void confidence_limits_on_mean @@ -118,48 +117,48 @@ void single_sample_t_test(double M, double Sm, double Sd, unsigned Sn, double al "__________________________________\n" "Student t test for a single sample\n" "__________________________________\n\n"; - cout << boost::detail::setprecision(5); - cout << boost::detail::setw(55) << left << "Number of Observations" << "= " << Sn << "\n"; - cout << boost::detail::setw(55) << left << "Sample Mean" << "= " << Sm << "\n"; - cout << boost::detail::setw(55) << left << "Sample Standard Deviation" << "= " << Sd << "\n"; - cout << boost::detail::setw(55) << left << "Expected True Mean" << "= " << M << "\n\n"; + cout << setprecision(5); + cout << setw(55) << left << "Number of Observations" << "= " << Sn << "\n"; + cout << setw(55) << left << "Sample Mean" << "= " << Sm << "\n"; + cout << setw(55) << left << "Sample Standard Deviation" << "= " << Sd << "\n"; + cout << setw(55) << left << "Expected True Mean" << "= " << M << "\n\n"; // // Now we can calculate and output some stats: // // Difference in means: double diff = Sm - M; - cout << boost::detail::setw(55) << left << "Sample Mean - Expected Test Mean" << "= " << diff << "\n"; + cout << setw(55) << left << "Sample Mean - Expected Test Mean" << "= " << diff << "\n"; // Degrees of freedom: unsigned v = Sn - 1; - cout << boost::detail::setw(55) << left << "Degrees of Freedom" << "= " << v << "\n"; + cout << setw(55) << left << "Degrees of Freedom" << "= " << v << "\n"; // t-statistic: double t_stat = diff * sqrt(double(Sn)) / Sd; - cout << boost::detail::setw(55) << left << "T Statistic" << "= " << t_stat << "\n"; + cout << setw(55) << left << "T Statistic" << "= " << t_stat << "\n"; // // Finally define our distribution, and get the probability: // students_t dist(v); double q = cdf(complement(dist, fabs(t_stat))); - cout << boost::detail::setw(55) << left << "Probability that difference is due to chance" << "= " - << boost::detail::setprecision(3) << scientific << 2 * q << "\n\n"; + cout << setw(55) << left << "Probability that difference is due to chance" << "= " + << setprecision(3) << scientific << 2 * q << "\n\n"; // // Finally print out results of alternative hypothesis: // - cout << boost::detail::setw(55) << left << + cout << setw(55) << left << "Results for Alternative Hypothesis and alpha" << "= " - << boost::detail::setprecision(4) << fixed << alpha << "\n\n"; + << setprecision(4) << fixed << alpha << "\n\n"; cout << "Alternative Hypothesis Conclusion\n"; - cout << "Mean != " << boost::detail::setprecision(3) << fixed << M << " "; + cout << "Mean != " << setprecision(3) << fixed << M << " "; if(q < alpha / 2) cout << "NOT REJECTED\n"; else cout << "REJECTED\n"; - cout << "Mean < " << boost::detail::setprecision(3) << fixed << M << " "; + cout << "Mean < " << setprecision(3) << fixed << M << " "; if(cdf(dist, t_stat) < alpha) cout << "NOT REJECTED\n"; else cout << "REJECTED\n"; - cout << "Mean > " << boost::detail::setprecision(3) << fixed << M << " "; + cout << "Mean > " << setprecision(3) << fixed << M << " "; if(cdf(complement(dist, t_stat)) < alpha) cout << "NOT REJECTED\n"; else @@ -182,10 +181,10 @@ void single_sample_find_df(double M, double Sm, double Sd) "_____________________________________________________________\n" "Estimated sample sizes required for various confidence levels\n" "_____________________________________________________________\n\n"; - cout << boost::detail::setprecision(5); - cout << boost::detail::setw(40) << left << "True Mean" << "= " << M << "\n"; - cout << boost::detail::setw(40) << left << "Sample Mean" << "= " << Sm << "\n"; - cout << boost::detail::setw(40) << left << "Sample Standard Deviation" << "= " << Sd << "\n"; + cout << setprecision(5); + cout << setw(40) << left << "True Mean" << "= " << M << "\n"; + cout << setw(40) << left << "Sample Mean" << "= " << Sm << "\n"; + cout << setw(40) << left << "Sample Standard Deviation" << "= " << Sd << "\n"; // // Define a table of significance intervals: // @@ -205,21 +204,21 @@ void single_sample_find_df(double M, double Sm, double Sd) for(unsigned i = 1; i < sizeof(alpha)/sizeof(alpha[0]); ++i) { // Confidence value: - cout << fixed << boost::detail::setprecision(3) << boost::detail::setw(10) << right << 100 * (1-alpha[i]); + cout << fixed << setprecision(3) << setw(10) << right << 100 * (1-alpha[i]); // calculate df for single sided test: double df = students_t::find_degrees_of_freedom( fabs(M - Sm), alpha[i], alpha[i], Sd); // convert to sample size, always one more than the degrees of freedom: double size = ceil(df) + 1; // Print size: - cout << fixed << boost::detail::setprecision(0) << boost::detail::setw(16) << right << size; + cout << fixed << setprecision(0) << setw(16) << right << size; // calculate df for two sided test: df = students_t::find_degrees_of_freedom( fabs(M - Sm), alpha[i]/2, alpha[i], Sd); // convert to sample size: size = ceil(df) + 1; // Print size: - cout << fixed << boost::detail::setprecision(0) << boost::detail::setw(16) << right << size << endl; + cout << fixed << setprecision(0) << setw(16) << right << size << endl; } cout << endl; } // void single_sample_find_df diff --git a/example/students_t_two_samples.cpp b/example/students_t_two_samples.cpp index ea4278608..7bf86eead 100644 --- a/example/students_t_two_samples.cpp +++ b/example/students_t_two_samples.cpp @@ -12,13 +12,12 @@ # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required. #endif -#include #include using std::cout; using std::endl; using std::left; using std::fixed; using std::right; using std::scientific; -#include -using boost::detail::setw; -using boost::detail::setprecision; +#include +using std::setw; +using std::setprecision; #include using boost::math::students_t; @@ -39,7 +38,7 @@ void two_samples_t_test_equal_sd( // if due to chance. // See http://www.itl.nist.gov/div898/handbook/eda/section3/eda353.htm // - // using namespace std; + using namespace std; // using namespace boost::math; using boost::math::students_t; @@ -49,38 +48,38 @@ void two_samples_t_test_equal_sd( "_______________________________________________\n" "Student t test for two samples (equal variances)\n" "_______________________________________________\n\n"; - cout << boost::detail::setprecision(5); - cout << boost::detail::setw(55) << left << "Number of Observations (Sample 1)" << "= " << Sn1 << "\n"; - cout << boost::detail::setw(55) << left << "Sample 1 Mean" << "= " << Sm1 << "\n"; - cout << boost::detail::setw(55) << left << "Sample 1 Standard Deviation" << "= " << Sd1 << "\n"; - cout << boost::detail::setw(55) << left << "Number of Observations (Sample 2)" << "= " << Sn2 << "\n"; - cout << boost::detail::setw(55) << left << "Sample 2 Mean" << "= " << Sm2 << "\n"; - cout << boost::detail::setw(55) << left << "Sample 2 Standard Deviation" << "= " << Sd2 << "\n"; + cout << setprecision(5); + cout << setw(55) << left << "Number of Observations (Sample 1)" << "= " << Sn1 << "\n"; + cout << setw(55) << left << "Sample 1 Mean" << "= " << Sm1 << "\n"; + cout << setw(55) << left << "Sample 1 Standard Deviation" << "= " << Sd1 << "\n"; + cout << setw(55) << left << "Number of Observations (Sample 2)" << "= " << Sn2 << "\n"; + cout << setw(55) << left << "Sample 2 Mean" << "= " << Sm2 << "\n"; + cout << setw(55) << left << "Sample 2 Standard Deviation" << "= " << Sd2 << "\n"; // // Now we can calculate and output some stats: // // Degrees of freedom: double v = Sn1 + Sn2 - 2; - cout << boost::detail::setw(55) << left << "Degrees of Freedom" << "= " << v << "\n"; + cout << setw(55) << left << "Degrees of Freedom" << "= " << v << "\n"; // Pooled variance: double sp = sqrt(((Sn1-1) * Sd1 * Sd1 + (Sn2-1) * Sd2 * Sd2) / v); - cout << boost::detail::setw(55) << left << "Pooled Standard Deviation" << "= " << v << "\n"; + cout << setw(55) << left << "Pooled Standard Deviation" << "= " << v << "\n"; // t-statistic: double t_stat = (Sm1 - Sm2) / (sp * sqrt(1.0 / Sn1 + 1.0 / Sn2)); - cout << boost::detail::setw(55) << left << "T Statistic" << "= " << t_stat << "\n"; + cout << setw(55) << left << "T Statistic" << "= " << t_stat << "\n"; // // Define our distribution, and get the probability: // students_t dist(v); double q = cdf(complement(dist, fabs(t_stat))); - cout << boost::detail::setw(55) << left << "Probability that difference is due to chance" << "= " - << boost::detail::setprecision(3) << scientific << 2 * q << "\n\n"; + cout << setw(55) << left << "Probability that difference is due to chance" << "= " + << setprecision(3) << scientific << 2 * q << "\n\n"; // // Finally print out results of alternative hypothesis: // - cout << boost::detail::setw(55) << left << + cout << setw(55) << left << "Results for Alternative Hypothesis and alpha" << "= " - << boost::detail::setprecision(4) << fixed << alpha << "\n\n"; + << setprecision(4) << fixed << alpha << "\n\n"; cout << "Alternative Hypothesis Conclusion\n"; cout << "Sample 1 Mean != Sample 2 Mean " ; if(q < alpha / 2) @@ -115,7 +114,7 @@ void two_samples_t_test_unequal_sd( // that any difference is due to chance. // See http://www.itl.nist.gov/div898/handbook/eda/section3/eda353.htm // - //using namespace std; + using namespace std; using boost::math::students_t; // Print header: @@ -123,13 +122,13 @@ void two_samples_t_test_unequal_sd( "_________________________________________________\n" "Student t test for two samples (unequal variances)\n" "_________________________________________________\n\n"; - cout << boost::detail::setprecision(5); - cout << boost::detail::setw(55) << left << "Number of Observations (Sample 1)" << "= " << Sn1 << "\n"; - cout << boost::detail::setw(55) << left << "Sample 1 Mean" << "= " << Sm1 << "\n"; - cout << boost::detail::setw(55) << left << "Sample 1 Standard Deviation" << "= " << Sd1 << "\n"; - cout << boost::detail::setw(55) << left << "Number of Observations (Sample 2)" << "= " << Sn2 << "\n"; - cout << boost::detail::setw(55) << left << "Sample 2 Mean" << "= " << Sm2 << "\n"; - cout << boost::detail::setw(55) << left << "Sample 2 Standard Deviation" << "= " << Sd2 << "\n"; + cout << setprecision(5); + cout << setw(55) << left << "Number of Observations (Sample 1)" << "= " << Sn1 << "\n"; + cout << setw(55) << left << "Sample 1 Mean" << "= " << Sm1 << "\n"; + cout << setw(55) << left << "Sample 1 Standard Deviation" << "= " << Sd1 << "\n"; + cout << setw(55) << left << "Number of Observations (Sample 2)" << "= " << Sn2 << "\n"; + cout << setw(55) << left << "Sample 2 Mean" << "= " << Sm2 << "\n"; + cout << setw(55) << left << "Sample 2 Standard Deviation" << "= " << Sd2 << "\n"; // // Now we can calculate and output some stats: // @@ -143,23 +142,23 @@ void two_samples_t_test_unequal_sd( t2 *= t2; t2 /= (Sn2 - 1); v /= (t1 + t2); - cout << boost::detail::setw(55) << left << "Degrees of Freedom" << "= " << v << "\n"; + cout << setw(55) << left << "Degrees of Freedom" << "= " << v << "\n"; // t-statistic: double t_stat = (Sm1 - Sm2) / sqrt(Sd1 * Sd1 / Sn1 + Sd2 * Sd2 / Sn2); - cout << boost::detail::setw(55) << left << "T Statistic" << "= " << t_stat << "\n"; + cout << setw(55) << left << "T Statistic" << "= " << t_stat << "\n"; // // Define our distribution, and get the probability: // students_t dist(v); double q = cdf(complement(dist, fabs(t_stat))); - cout << boost::detail::setw(55) << left << "Probability that difference is due to chance" << "= " - << boost::detail::setprecision(3) << scientific << 2 * q << "\n\n"; + cout << setw(55) << left << "Probability that difference is due to chance" << "= " + << setprecision(3) << scientific << 2 * q << "\n\n"; // // Finally print out results of alternative hypothesis: // - cout << boost::detail::setw(55) << left << + cout << setw(55) << left << "Results for Alternative Hypothesis and alpha" << "= " - << boost::detail::setprecision(4) << fixed << alpha << "\n\n"; + << setprecision(4) << fixed << alpha << "\n\n"; cout << "Alternative Hypothesis Conclusion\n"; cout << "Sample 1 Mean != Sample 2 Mean " ; if(q < alpha / 2) diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index c3d320608..198cd020b 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -9,7 +9,7 @@ #define BOOST_MATH_POLICY_ERROR_HANDLING_HPP #include -#include +#include #include #include #include @@ -108,7 +108,7 @@ void raise_error(const char* function, const char* message, const T& val) msg += message; int prec = 2 + (boost::math::policies::digits >() * 30103UL) / 100000UL; - msg = do_format(boost::format(msg), boost::io::group(boost::detail::setprecision(prec), val)); + msg = do_format(boost::format(msg), boost::io::group(std::setprecision(prec), val)); E e(msg); boost::throw_exception(e); diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 291602326..5d414259b 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -51,7 +51,7 @@ #ifdef BOOST_MATH_INSTRUMENT #include -#include +#include #include #endif diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 3199d7966..e2429133f 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -289,7 +289,7 @@ inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d) #ifdef BOOST_MATH_INSTRUMENT #define BOOST_MATH_INSTRUMENT_CODE(x) \ - std::cout << boost::detail::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl; + std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl; #define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name) #else #define BOOST_MATH_INSTRUMENT_CODE(x) diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index 4920a5f07..e7695e92a 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include // These two are for LDBL_MAN_DIG: #include #include diff --git a/include/boost/math/tools/test.hpp b/include/boost/math/tools/test.hpp index 2f319e301..c54e82727 100644 --- a/include/boost/math/tools/test.hpp +++ b/include/boost/math/tools/test.hpp @@ -156,7 +156,7 @@ void set_output_precision(T) { if(std::numeric_limits::digits10) { - std::cout << boost::detail::setprecision(std::numeric_limits::digits10 + 2); + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); } } diff --git a/minimax/Jamfile.v2 b/minimax/Jamfile.v2 index 969bc5ea9..212ff5952 100644 --- a/minimax/Jamfile.v2 +++ b/minimax/Jamfile.v2 @@ -14,8 +14,6 @@ local ntl-path = [ modules.peek : NTL_PATH ] ; project : requirements - pathscale:-Wno-missing-braces - clang:-Wno-missing-braces gcc:-Wno-missing-braces darwin:-Wno-missing-braces acc:+W2068,2461,2236,4070,4069 diff --git a/minimax/main.cpp b/minimax/main.cpp index e00bd0dfe..ca7a5071e 100644 --- a/minimax/main.cpp +++ b/minimax/main.cpp @@ -18,7 +18,7 @@ using boost::math::ntl::pow; #include #include #include -#include +#include #include #include // for test_main @@ -88,7 +88,7 @@ void step_some(unsigned count) rel_error, skew, working_precision)); - std::cout << "Max error in interpolated form: " << boost::detail::setprecision(3) << std::scientific << boost::math::tools::real_cast(p_remez->max_error()) << std::endl; + std::cout << "Max error in interpolated form: " << std::setprecision(3) << std::scientific << boost::math::tools::real_cast(p_remez->max_error()) << std::endl; // // Signal that we've started: // @@ -102,9 +102,9 @@ void step_some(unsigned count) boost::math::ntl::RR r = p_remez->iterate(); NTL::RR::SetOutputPrecision(3); std::cout - << "Maximum Deviation Found: " << boost::detail::setprecision(3) << std::scientific << boost::math::tools::real_cast(p_remez->max_error()) << std::endl - << "Expected Error Term: " << boost::detail::setprecision(3) << std::scientific << boost::math::tools::real_cast(p_remez->error_term()) << std::endl - << "Maximum Relative Change in Control Points: " << boost::detail::setprecision(3) << std::scientific << boost::math::tools::real_cast(r) << std::endl; + << "Maximum Deviation Found: " << std::setprecision(3) << std::scientific << boost::math::tools::real_cast(p_remez->max_error()) << std::endl + << "Expected Error Term: " << std::setprecision(3) << std::scientific << boost::math::tools::real_cast(p_remez->error_term()) << std::endl + << "Maximum Relative Change in Control Points: " << std::setprecision(3) << std::scientific << boost::math::tools::real_cast(r) << std::endl; } } catch(const std::exception& e) @@ -128,7 +128,7 @@ void show(const char*, const char*) std::vector cn = n.chebyshev(); std::vector cd = d.chebyshev(); int prec = 2 + (target_precision * 3010LL)/10000; - std::cout << std::scientific << boost::detail::setprecision(prec); + std::cout << std::scientific << std::setprecision(prec); NTL::RR::SetOutputPrecision(prec); boost::numeric::ublas::vector v = p_remez->zero_points(); @@ -196,12 +196,12 @@ void do_graph(unsigned points) while(points > 1) { NTL::RR::SetOutputPrecision(10); - std::cout << boost::detail::setprecision(10) << boost::detail::setw(30) << std::left + std::cout << std::setprecision(10) << std::setw(30) << std::left << boost::lexical_cast(x) << the_function(x) << std::endl; --points; x += step; } - std::cout << boost::detail::setprecision(10) << boost::detail::setw(30) << std::left + std::cout << std::setprecision(10) << std::setw(30) << std::left << boost::lexical_cast(b) << the_function(b) << std::endl; } @@ -277,8 +277,8 @@ void do_test(T, const char* name) max_error = err; if(cheb_err > cheb_max_error) cheb_max_error = cheb_err; - std::cout << boost::detail::setprecision(6) << boost::detail::setw(15) << std::left << absissa - << boost::detail::setw(15) << std::left << boost::math::tools::real_cast(err) << boost::math::tools::real_cast(cheb_err) << std::endl; + std::cout << std::setprecision(6) << std::setw(15) << std::left << absissa + << std::setw(15) << std::left << boost::math::tools::real_cast(err) << boost::math::tools::real_cast(cheb_err) << std::endl; } // // Do the tests at the Chebeshev control points: @@ -302,15 +302,15 @@ void do_test(T, const char* name) } if(err > max_error) max_error = err; - std::cout << boost::detail::setprecision(6) << boost::detail::setw(15) << std::left << absissa - << boost::detail::setw(15) << std::left << boost::math::tools::real_cast(err) << + std::cout << std::setprecision(6) << std::setw(15) << std::left << absissa + << std::setw(15) << std::left << boost::math::tools::real_cast(err) << boost::math::tools::real_cast(cheb_err) << std::endl; } std::string msg = "Max Error found at "; msg += name; msg += " precision = "; msg.append(62 - 17 - msg.size(), ' '); - std::cout << msg << boost::detail::setprecision(6) << "Poly: " << boost::detail::setw(20) << std::left + std::cout << msg << std::setprecision(6) << "Poly: " << std::setw(20) << std::left << boost::math::tools::real_cast(max_error) << "Cheb: " << boost::math::tools::real_cast(cheb_max_error) << std::endl; } else @@ -401,8 +401,8 @@ void do_test_n(T, const char* name, unsigned count) max_error = err; if(cheb_err > max_cheb_error) max_cheb_error = cheb_err; - std::cout << boost::detail::setprecision(6) << boost::detail::setw(15) << std::left << boost::math::tools::real_cast(absissa) - << (test_result < true_result ? "-" : "") << boost::detail::setw(20) << std::left + std::cout << std::setprecision(6) << std::setw(15) << std::left << boost::math::tools::real_cast(absissa) + << (test_result < true_result ? "-" : "") << std::setw(20) << std::left << boost::math::tools::real_cast(err) << boost::math::tools::real_cast(cheb_err) << std::endl; } @@ -410,8 +410,8 @@ void do_test_n(T, const char* name, unsigned count) msg += name; msg += " precision = "; //msg.append(62 - 17 - msg.size(), ' '); - std::cout << msg << "Poly: " << boost::detail::setprecision(6) - //<< boost::detail::setw(15) << std::left + std::cout << msg << "Poly: " << std::setprecision(6) + //<< std::setw(15) << std::left << boost::math::tools::real_cast(max_error) << " Cheb: " << boost::math::tools::real_cast(max_cheb_error) << std::endl; } diff --git a/octonion/octonion_test.cpp b/octonion/octonion_test.cpp index 09d22a49b..848e4de38 100644 --- a/octonion/octonion_test.cpp +++ b/octonion/octonion_test.cpp @@ -6,7 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) -#include +#include #include diff --git a/performance/main.cpp b/performance/main.cpp index 7c1801ab5..6052c4e27 100644 --- a/performance/main.cpp +++ b/performance/main.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -77,24 +77,20 @@ void run_tests() name = "msvc-"; #elif defined(BOOST_MSVC) && defined(_DEBUG) && !defined(__ICL) name = "msvc-debug-"; -#elif defined(BOOST_CLANG) - name = "clang-" -#elif defined(__PATHSCALE__) - name = "pathscale-" +#elif defined(__GNUC__) + name = "gcc-"; #elif defined(__ICL) name = "intel-"; #elif defined(__ICC) name = "intel-linux-"; -#elif defined(__GNUC__) - name = "gcc-"; #endif } name += i->name; set_call_count(1); - std::cout << "Testing " << std::left << boost::detail::setw(50) << name << std::flush; + std::cout << "Testing " << std::left << std::setw(50) << name << std::flush; double time = performance_measure(i->proc) - reference_time; time /= call_count; - std::cout << boost::detail::setprecision(3) << std::scientific << time << std::endl; + std::cout << std::setprecision(3) << std::scientific << time << std::endl; } } diff --git a/quaternion/quaternion_test.cpp b/quaternion/quaternion_test.cpp index 819ea441d..6da75db40 100644 --- a/quaternion/quaternion_test.cpp +++ b/quaternion/quaternion_test.cpp @@ -6,7 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) -#include +#include #include diff --git a/special_functions/acosh_test.hpp b/special_functions/acosh_test.hpp index 3a439f767..162f2809a 100644 --- a/special_functions/acosh_test.hpp +++ b/special_functions/acosh_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include @@ -70,11 +70,11 @@ void acosh_manual_check() long double xl = static_cast(i-50)/static_cast(5); - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << acosh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << acosh_error_evaluator(xd) - << ::boost::detail::setw(15) + << ::std::setw(15) << acosh_error_evaluator(xl)); } diff --git a/special_functions/asinh_test.hpp b/special_functions/asinh_test.hpp index 9096af1f9..dfe6124dc 100644 --- a/special_functions/asinh_test.hpp +++ b/special_functions/asinh_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include @@ -70,11 +70,11 @@ void asinh_manual_check() long double xl = static_cast(i-50)/static_cast(5); - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << asinh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << asinh_error_evaluator(xd) - << ::boost::detail::setw(15) + << ::std::setw(15) << asinh_error_evaluator(xl)); } diff --git a/special_functions/atanh_test.hpp b/special_functions/atanh_test.hpp index 5034ada9d..32cb7310d 100644 --- a/special_functions/atanh_test.hpp +++ b/special_functions/atanh_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include //#include @@ -116,11 +116,11 @@ void atanh_manual_check() std::numeric_limits::has_infinity ) { - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << atanh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xd) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xl)); } else @@ -144,11 +144,11 @@ void atanh_manual_check() } else { - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << atanh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xd) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xl)); } } diff --git a/special_functions/sinc_test.hpp b/special_functions/sinc_test.hpp index 891b424df..ddd62e506 100644 --- a/special_functions/sinc_test.hpp +++ b/special_functions/sinc_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include @@ -66,13 +66,13 @@ void sinc_pi_manual_check() for (int i = 0; i <= 100; i++) { - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50))); } diff --git a/special_functions/sinhc_test.hpp b/special_functions/sinhc_test.hpp index 525d89da9..a6ffea936 100644 --- a/special_functions/sinhc_test.hpp +++ b/special_functions/sinhc_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include @@ -66,13 +66,13 @@ void sinhc_pi_manual_check() for (int i = 0; i <= 100; i++) { - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50))); } diff --git a/special_functions/special_functions_test.cpp b/special_functions/special_functions_test.cpp index e7d0aaf95..62a4b7c0c 100644 --- a/special_functions/special_functions_test.cpp +++ b/special_functions/special_functions_test.cpp @@ -6,7 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) -#include +#include #include @@ -121,9 +121,9 @@ boost::unit_test_framework::test_suite * init_unit_test_suite(int, char *[]) BOOST_MESSAGE("epsilon"); - BOOST_MESSAGE( ::boost::detail::setw(15) << numeric_limits::epsilon() - << ::boost::detail::setw(15) << numeric_limits::epsilon() - << ::boost::detail::setw(15) << numeric_limits::epsilon()); + BOOST_MESSAGE( ::std::setw(15) << numeric_limits::epsilon() + << ::std::setw(15) << numeric_limits::epsilon() + << ::std::setw(15) << numeric_limits::epsilon()); BOOST_MESSAGE(" "); diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3f19f7c5d..d8681804e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -17,13 +17,7 @@ local ntl-path = [ modules.peek : NTL_PATH ] ; local gmp_path = [ modules.peek : GMP_PATH ] ; project - : requirements - pathscale:-fno-fast-math - pathscale:-fno-unsafe-math-optimizations - pathscale:-mieee-fp - pathscale:-fstrict-overflow - pathscale:-Wno-missing-braces - clang:-Wno-missing-braces + : requirements gcc:-Wno-missing-braces darwin:-Wno-missing-braces acc:+W2068,2461,2236,4070,4069 diff --git a/test/acosh_test.hpp b/test/acosh_test.hpp index 5788f2ac9..fa3f8c6ae 100644 --- a/test/acosh_test.hpp +++ b/test/acosh_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include @@ -71,16 +71,16 @@ void acosh_manual_check() static_cast(i-50)/static_cast(5); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << acosh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << acosh_error_evaluator(xd) - << ::boost::detail::setw(15) + << ::std::setw(15) << acosh_error_evaluator(xl)); #else - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << acosh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << acosh_error_evaluator(xd)); #endif } diff --git a/test/asinh_test.hpp b/test/asinh_test.hpp index 5cecae5f3..0cb4b2315 100644 --- a/test/asinh_test.hpp +++ b/test/asinh_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include @@ -71,16 +71,16 @@ void asinh_manual_check() static_cast(i-40)/static_cast(4); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << asinh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << asinh_error_evaluator(xd) - << ::boost::detail::setw(15) + << ::std::setw(15) << asinh_error_evaluator(xl)); #else - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << asinh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << asinh_error_evaluator(xd)); #endif } diff --git a/test/atanh_test.hpp b/test/atanh_test.hpp index 26cb270a8..32a628e2f 100644 --- a/test/atanh_test.hpp +++ b/test/atanh_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include //#include @@ -117,16 +117,16 @@ void atanh_manual_check() ) { #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << atanh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xd) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xl)); #else - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << atanh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xd)); #endif } @@ -152,16 +152,16 @@ void atanh_manual_check() else { #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << atanh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xd) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xl)); #else - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << atanh_error_evaluator(xf) - << ::boost::detail::setw(15) + << ::std::setw(15) << atanh_error_evaluator(xd)); #endif } diff --git a/test/complex_test.cpp b/test/complex_test.cpp index d4b60d8d6..8c619d535 100644 --- a/test/complex_test.cpp +++ b/test/complex_test.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -116,7 +116,7 @@ void test_inverse_trig(T) T x, y; - std::cout << boost::detail::setprecision(std::numeric_limits::digits10+2); + std::cout << std::setprecision(std::numeric_limits::digits10+2); for(x = -1; x <= 1; x += interval) { diff --git a/test/handle_test_result.hpp b/test/handle_test_result.hpp index e89cc6958..9f6eb10dd 100644 --- a/test/handle_test_result.hpp +++ b/test/handle_test_result.hpp @@ -11,7 +11,6 @@ #include #include #include -#include #if defined(BOOST_INTEL) # pragma warning(disable:239) @@ -119,7 +118,7 @@ void handle_test_result(const boost::math::tools::test_result& result, { using namespace std; // To aid selection of the right pow. T eps = boost::math::tools::epsilon(); - std::cout << boost::detail::setprecision(4); + std::cout << std::setprecision(4); T max_error_found = (result.max)()/eps; T mean_error_found = result.rms()/eps; @@ -138,11 +137,11 @@ void handle_test_result(const boost::math::tools::test_result& result, << row << "\n { "; if(std::numeric_limits::digits10) { - std::cout << boost::detail::setprecision(std::numeric_limits::digits10 + 2); + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); } else { - std::cout << boost::detail::setprecision(std::numeric_limits::digits10 + 2); + std::cout << std::setprecision(std::numeric_limits::digits10 + 2); } for(unsigned i = 0; i < worst.size(); ++i) { @@ -180,7 +179,7 @@ void print_test_result(const boost::math::tools::test_result& result, { using namespace std; // To aid selection of the right pow. T eps = boost::math::tools::epsilon(); - std::cout << boost::detail::setprecision(4); + std::cout << std::setprecision(4); T max_error_found = (result.max)()/eps; T mean_error_found = result.rms()/eps; diff --git a/test/sinc_test.hpp b/test/sinc_test.hpp index 31ca41296..e2f32c0e6 100644 --- a/test/sinc_test.hpp +++ b/test/sinc_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include @@ -67,20 +67,20 @@ void sinc_pi_manual_check() for (int i = 0; i <= 100; i++) { #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50))); #else - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinc_pi(static_cast(i-50)/ static_cast(50))); #endif diff --git a/test/sinhc_test.hpp b/test/sinhc_test.hpp index 3d8e9da98..7b7e62ed5 100644 --- a/test/sinhc_test.hpp +++ b/test/sinhc_test.hpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include @@ -67,20 +67,20 @@ void sinhc_pi_manual_check() for (int i = 0; i <= 100; i++) { #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50))); #else - BOOST_MESSAGE( ::boost::detail::setw(15) + BOOST_MESSAGE( ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50)) - << ::boost::detail::setw(15) + << ::std::setw(15) << sinhc_pi(static_cast(i-50)/ static_cast(50))); #endif diff --git a/test/special_functions_test.cpp b/test/special_functions_test.cpp index cfd564285..b6f08edbb 100644 --- a/test/special_functions_test.cpp +++ b/test/special_functions_test.cpp @@ -6,7 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) -#include +#include #include @@ -128,9 +128,9 @@ boost::unit_test_framework::test_suite * init_unit_test_suite(int, char *[]) BOOST_MESSAGE("epsilon"); - BOOST_MESSAGE( ::boost::detail::setw(15) << numeric_limits::epsilon() - << ::boost::detail::setw(15) << numeric_limits::epsilon() - << ::boost::detail::setw(15) << numeric_limits::epsilon()); + BOOST_MESSAGE( ::std::setw(15) << numeric_limits::epsilon() + << ::std::setw(15) << numeric_limits::epsilon() + << ::std::setw(15) << numeric_limits::epsilon()); BOOST_MESSAGE(" "); diff --git a/test/test_bernoulli.cpp b/test/test_bernoulli.cpp index 7f72b9ae0..23b0ad4f8 100644 --- a/test/test_bernoulli.cpp +++ b/test/test_bernoulli.cpp @@ -28,8 +28,6 @@ using boost::math::bernoulli_distribution; #include // for test_main #include // for BOOST_CHECK_CLOSE_FRACTION, BOOST_CHECK_EQUAL... -#include -#include #include using std::cout; using std::endl; @@ -38,8 +36,8 @@ using std::right; using std::left; using std::showpoint; using std::showpos; -using boost::detail::setw; -using boost::detail::setprecision; +using std::setw; +using std::setprecision; #include using std::numeric_limits; @@ -59,7 +57,7 @@ void test_spots(RealType) tolerance *= 100; cout << "Tolerance for type " << typeid(RealType).name() << " is " - << boost::detail::setprecision(3) << tolerance << " (or " << tolerance * 100 << "%)." << endl; + << setprecision(3) << tolerance << " (or " << tolerance * 100 << "%)." << endl; // Sources of spot test values - calculator, // or Steve Moshier's command interpreter V1.3 100 decimal digit calculator, diff --git a/test/test_dist_overloads.cpp b/test/test_dist_overloads.cpp index 0fca0c2ba..e75d7f0ef 100644 --- a/test/test_dist_overloads.cpp +++ b/test/test_dist_overloads.cpp @@ -15,11 +15,10 @@ #include // Boost.Test #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; template void test_spots(RealType) diff --git a/test/test_exponential_dist.cpp b/test/test_exponential_dist.cpp index 431dbe06c..c11611662 100644 --- a/test/test_exponential_dist.cpp +++ b/test/test_exponential_dist.cpp @@ -15,11 +15,10 @@ #include // Boost.Test #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; template void test_spot(RealType l, RealType x, RealType p, RealType q, RealType tolerance) diff --git a/test/test_extreme_value.cpp b/test/test_extreme_value.cpp index 3fb465470..a1b4f4804 100644 --- a/test/test_extreme_value.cpp +++ b/test/test_extreme_value.cpp @@ -14,11 +14,10 @@ #include // Boost.Test #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; template void test_spot(RealType a, RealType b, RealType x, RealType p, RealType q, RealType tolerance) diff --git a/test/test_find_location.cpp b/test/test_find_location.cpp index 2efcf89e2..3453c35d5 100644 --- a/test/test_find_location.cpp +++ b/test/test_find_location.cpp @@ -32,12 +32,10 @@ #include // for test_main #include // for BOOST_CHECK_CLOSE_FRACTION, BOOST_CHECK_EQUAL... -#include -#include #include using std::cout; using std::endl; using std::fixed; using std::right; using std::left; using std::showpoint; - using std::showpos; using boost::detail::setw; using boost::detail::setprecision; + using std::showpos; using std::setw; using std::setprecision; #include using std::numeric_limits; @@ -57,7 +55,7 @@ void test_spots(RealType) tolerance *= 100; // 100 eps as a fraction. cout << "Tolerance for type " << typeid(RealType).name() << " is " - << boost::detail::setprecision(3) << tolerance << " (or " << tolerance * 100 << "%)." << endl; + << setprecision(3) << tolerance << " (or " << tolerance * 100 << "%)." << endl; BOOST_CHECK_THROW( // Probability outside 0 to 1. find_location >( diff --git a/test/test_find_scale.cpp b/test/test_find_scale.cpp index e0f24a9ef..678e2c053 100644 --- a/test/test_find_scale.cpp +++ b/test/test_find_scale.cpp @@ -32,12 +32,10 @@ #include // for test_main #include // for BOOST_CHECK_CLOSE_FRACTION, BOOST_CHECK_EQUAL... -#include -#include #include using std::cout; using std::endl; using std::fixed; using std::right; using std::left; using std::showpoint; - using std::showpos; using boost::detail::setw; using boost::detail::setprecision; + using std::showpos; using std::setw; using std::setprecision; #include using std::numeric_limits; @@ -57,7 +55,7 @@ void test_spots(RealType) tolerance *= 100; // 100 eps as a fraction. cout << "Tolerance for type " << typeid(RealType).name() << " is " - << boost::detail::setprecision(3) << tolerance << " (or " << tolerance * 100 << "%)." << endl; + << setprecision(3) << tolerance << " (or " << tolerance * 100 << "%)." << endl; BOOST_CHECK_THROW( // Probability outside 0 to 1. find_scale >( diff --git a/test/test_gamma_dist.cpp b/test/test_gamma_dist.cpp index e186884cb..451dc263d 100644 --- a/test/test_gamma_dist.cpp +++ b/test/test_gamma_dist.cpp @@ -25,11 +25,10 @@ using boost::math::gamma_distribution; #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include using std::numeric_limits; diff --git a/test/test_geometric.cpp b/test/test_geometric.cpp index ba91cc267..6958b6253 100644 --- a/test/test_geometric.cpp +++ b/test/test_geometric.cpp @@ -38,12 +38,10 @@ using boost::math::geometric; // using typedef for geometric_distribution // for test_main #include // for BOOST_CHECK_CLOSE_FRACTION -#include -#include #include using std::cout; using std::endl; -using boost::detail::setprecision; +using std::setprecision; using std::showpoint; #include using std::numeric_limits; diff --git a/test/test_hypergeometric_dist.cpp b/test/test_hypergeometric_dist.cpp index 8b72370d8..4f3b50e61 100644 --- a/test/test_hypergeometric_dist.cpp +++ b/test/test_hypergeometric_dist.cpp @@ -16,11 +16,10 @@ #include #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include #include "functor.hpp" @@ -33,7 +32,7 @@ if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was with data ";\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "x = " << x << ", r = " << r << ", n = " << n\ << ", N = " << N << ", p = " << cp << ", q = " << ccp << std::endl;\ }\ diff --git a/test/test_igamma_inv.cpp b/test/test_igamma_inv.cpp index e2b484de3..74c63c50c 100644 --- a/test/test_igamma_inv.cpp +++ b/test/test_igamma_inv.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include "functor.hpp" @@ -197,7 +196,7 @@ void expected_results() if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " , " << data[i][5] << " } " << std::endl;\ }\ diff --git a/test/test_igamma_inva.cpp b/test/test_igamma_inva.cpp index 152aa098a..b6c13366b 100644 --- a/test/test_igamma_inva.cpp +++ b/test/test_igamma_inva.cpp @@ -17,11 +17,9 @@ #include #include #include -#include #include #include "functor.hpp" - #include "handle_test_result.hpp" #if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT) @@ -126,7 +124,7 @@ void expected_results() if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " , " << data[i][5] << " } " << std::endl;\ }\ diff --git a/test/test_inverse_gaussian.cpp b/test/test_inverse_gaussian.cpp index cc3a2f327..12b7599bb 100644 --- a/test/test_inverse_gaussian.cpp +++ b/test/test_inverse_gaussian.cpp @@ -26,11 +26,10 @@ using boost::math::inverse_gaussian; #include -#include #include using std::cout; using std::endl; -using boost::detail::setprecision; +using std::setprecision; #include using std::numeric_limits; diff --git a/test/test_laplace.cpp b/test/test_laplace.cpp index 82d32cfd7..3afa1ca2f 100644 --- a/test/test_laplace.cpp +++ b/test/test_laplace.cpp @@ -68,7 +68,7 @@ using boost::math::laplace_distribution; #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include using std::numeric_limits; diff --git a/test/test_logistic_dist.cpp b/test/test_logistic_dist.cpp index 63fe32ee2..04d1a47d5 100644 --- a/test/test_logistic_dist.cpp +++ b/test/test_logistic_dist.cpp @@ -15,11 +15,10 @@ #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; template diff --git a/test/test_lognormal.cpp b/test/test_lognormal.cpp index 143864bd0..4726032ef 100644 --- a/test/test_lognormal.cpp +++ b/test/test_lognormal.cpp @@ -16,11 +16,10 @@ using boost::math::lognormal_distribution; #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include using std::numeric_limits; #include diff --git a/test/test_long_double_support.cpp b/test/test_long_double_support.cpp index 792eb7eb9..f0fd23bf9 100644 --- a/test/test_long_double_support.cpp +++ b/test/test_long_double_support.cpp @@ -15,10 +15,10 @@ #include #include -#include +#include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include #include "functor.hpp" diff --git a/test/test_nc_beta.cpp b/test/test_nc_beta.cpp index 4a043de0b..f87eb658d 100644 --- a/test/test_nc_beta.cpp +++ b/test/test_nc_beta.cpp @@ -35,7 +35,6 @@ #include "handle_test_result.hpp" #include "test_ncbeta_hooks.hpp" -#include #include using std::cout; using std::endl; @@ -49,7 +48,7 @@ using std::numeric_limits; if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " } " << std::endl;\ }\ @@ -62,7 +61,7 @@ using std::numeric_limits; if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " } " << std::endl;\ }\ diff --git a/test/test_nc_chi_squared.cpp b/test/test_nc_chi_squared.cpp index 5b71af5aa..59461a39c 100644 --- a/test/test_nc_chi_squared.cpp +++ b/test/test_nc_chi_squared.cpp @@ -32,7 +32,6 @@ #include "handle_test_result.hpp" #include "test_nccs_hooks.hpp" -#include #include using std::cout; using std::endl; @@ -46,7 +45,7 @@ using std::numeric_limits; if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " } " << std::endl;\ }\ @@ -59,7 +58,7 @@ using std::numeric_limits; if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " } " << std::endl;\ }\ diff --git a/test/test_nc_f.cpp b/test/test_nc_f.cpp index a632c127e..ffff944c8 100644 --- a/test/test_nc_f.cpp +++ b/test/test_nc_f.cpp @@ -30,7 +30,6 @@ #include "functor.hpp" #include "handle_test_result.hpp" -#include #include using std::cout; using std::endl; @@ -44,7 +43,7 @@ using std::numeric_limits; if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " } " << std::endl;\ }\ @@ -57,7 +56,7 @@ using std::numeric_limits; if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " } " << std::endl;\ }\ diff --git a/test/test_nc_t.cpp b/test/test_nc_t.cpp index 563de2578..af7edff6f 100644 --- a/test/test_nc_t.cpp +++ b/test/test_nc_t.cpp @@ -30,7 +30,6 @@ #include "functor.hpp" #include "handle_test_result.hpp" -#include #include using std::cout; using std::endl; @@ -44,7 +43,7 @@ using std::numeric_limits; if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " } " << std::endl;\ }\ @@ -57,7 +56,7 @@ using std::numeric_limits; if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " } " << std::endl;\ }\ diff --git a/test/test_negative_binomial.cpp b/test/test_negative_binomial.cpp index 2980d0105..984d169a9 100644 --- a/test/test_negative_binomial.cpp +++ b/test/test_negative_binomial.cpp @@ -38,12 +38,10 @@ using boost::math::negative_binomial_distribution; #include // for test_main #include // for BOOST_CHECK_CLOSE -#include -#include #include using std::cout; using std::endl; -using boost::detail::setprecision; +using std::setprecision; using std::showpoint; #include using std::numeric_limits; diff --git a/test/test_normal.cpp b/test/test_normal.cpp index 6154639e0..3dfb943f5 100644 --- a/test/test_normal.cpp +++ b/test/test_normal.cpp @@ -31,11 +31,10 @@ using boost::math::normal_distribution; #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include using std::numeric_limits; diff --git a/test/test_pareto.cpp b/test/test_pareto.cpp index 8c5675d98..9ffaba714 100644 --- a/test/test_pareto.cpp +++ b/test/test_pareto.cpp @@ -31,11 +31,10 @@ using boost::math::pareto_distribution; #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include using std::numeric_limits; diff --git a/test/test_poisson.cpp b/test/test_poisson.cpp index 09e6e68ce..e4114ece0 100644 --- a/test/test_poisson.cpp +++ b/test/test_poisson.cpp @@ -34,12 +34,10 @@ #include // for (incomplete) gamma. // using boost::math::qamma_Q; -#include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; using std::showpoint; using std::ios; #include @@ -558,7 +556,7 @@ int test_main(int, char* []) { cout << boost::math::gamma_q(i+1, mean); // cdf double diff = boost::math::gamma_q(i+1, mean) - sum; // cdf -sum - cout << boost::detail::setprecision (2) << ' ' << diff; // 0 0 to 4, 1 eps 5 to 9, 10 to 20 2 eps, 21 upwards 3 eps + cout << setprecision (2) << ' ' << diff; // 0 0 to 4, 1 eps 5 to 9, 10 to 20 2 eps, 21 upwards 3 eps } BOOST_CHECK_CLOSE( @@ -566,7 +564,7 @@ int test_main(int, char* []) sum, // of pdfs. 4e-14); // Fails at 2e-14 // This call puts the precision etc back to default 6 !!! - cout << boost::detail::setprecision(17) << showpoint; + cout << setprecision(17) << showpoint; cout << endl; diff --git a/test/test_rayleigh.cpp b/test/test_rayleigh.cpp index 828fa9e18..e9b675a37 100644 --- a/test/test_rayleigh.cpp +++ b/test/test_rayleigh.cpp @@ -19,11 +19,10 @@ #include // Boost.Test #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; template void test_spot(RealType s, RealType x, RealType p, RealType q, RealType tolerance) diff --git a/test/test_real_concept_neg_bin.cpp b/test/test_real_concept_neg_bin.cpp index 1b90a71dd..68ddba6c0 100644 --- a/test/test_real_concept_neg_bin.cpp +++ b/test/test_real_concept_neg_bin.cpp @@ -20,12 +20,10 @@ using boost::math::geometric; // using typedef for geometric_distribution // for some comparisons. -#include -#include #include using std::cout; using std::endl; -using boost::detail::setprecision; +using std::setprecision; using std::showpoint; #include using std::numeric_limits; diff --git a/test/test_roots.cpp b/test/test_roots.cpp index f3959de23..858078c62 100644 --- a/test/test_roots.cpp +++ b/test/test_roots.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #define BOOST_CHECK_CLOSE_EX(a, b, prec, i) \ {\ @@ -22,7 +21,7 @@ if(failures != boost::unit_test::results_collector.results( boost::unit_test::framework::current_test_case().p_id ).p_assertions_failed)\ {\ std::cerr << "Failure was at row " << i << std::endl;\ - std::cerr << boost::detail::setprecision(35); \ + std::cerr << std::setprecision(35); \ std::cerr << "{ " << data[i][0] << " , " << data[i][1] << " , " << data[i][2];\ std::cerr << " , " << data[i][3] << " , " << data[i][4] << " , " << data[i][5] << " } " << std::endl;\ }\ diff --git a/test/test_round.cpp b/test/test_round.cpp index cdd364ef7..6f16b3d1e 100644 --- a/test/test_round.cpp +++ b/test/test_round.cpp @@ -13,7 +13,6 @@ #include #include #include -#include boost::mt19937 rng; @@ -46,13 +45,13 @@ void check_within_half(T a, U u) if(fabs(a-u) > 0.5f) { BOOST_ERROR("Rounded result differed by more than 0.5 from the original"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << boost::detail::setw(40) + std::cerr << "Values were: " << std::setprecision(35) << std::setw(40) << std::left << a << u << std::endl; } if((fabs(a - u) == 0.5f) && (fabs(static_cast(u)) < fabs(a))) { BOOST_ERROR("Rounded result was towards zero with boost::round"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << boost::detail::setw(40) + std::cerr << "Values were: " << std::setprecision(35) << std::setw(40) << std::left << a << u << std::endl; } } @@ -73,19 +72,19 @@ void check_trunc_result(T a, U u) if(fabs(a-u) >= 1) { BOOST_ERROR("Rounded result differed by more than 1 from the original"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << boost::detail::setw(40) + std::cerr << "Values were: " << std::setprecision(35) << std::setw(40) << std::left << a << u << std::endl; } if(abs(a) < safe_abs(u)) { BOOST_ERROR("Truncated result had larger absolute value than the original"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << boost::detail::setw(40) + std::cerr << "Values were: " << std::setprecision(35) << std::setw(40) << std::left << a << u << std::endl; } if(fabs(static_cast(u)) > fabs(a)) { BOOST_ERROR("Rounded result was away from zero with boost::trunc"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << boost::detail::setw(40) + std::cerr << "Values were: " << std::setprecision(35) << std::setw(40) << std::left << a << u << std::endl; } } @@ -97,25 +96,25 @@ void check_modf_result(T a, T fract, U ipart) if(fract + ipart != a) { BOOST_ERROR("Fractional and integer results do not add up to the original value"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << " " + std::cerr << "Values were: " << std::setprecision(35) << " " << std::left << a << ipart << " " << fract << std::endl; } if((boost::math::sign(a) != boost::math::sign(fract)) && boost::math::sign(fract)) { BOOST_ERROR("Original and fractional parts have differing signs"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << " " + std::cerr << "Values were: " << std::setprecision(35) << " " << std::left << a << ipart << " " << fract << std::endl; } if((boost::math::sign(a) != boost::math::sign(ipart)) && boost::math::sign(ipart)) { BOOST_ERROR("Original and integer parts have differing signs"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << " " + std::cerr << "Values were: " << std::setprecision(35) << " " << std::left << a << ipart << " " << ipart << std::endl; } if(fabs(a-ipart) >= 1) { BOOST_ERROR("Rounded result differed by more than 1 from the original"); - std::cerr << "Values were: " << boost::detail::setprecision(35) << boost::detail::setw(40) + std::cerr << "Values were: " << std::setprecision(35) << std::setw(40) << std::left << a << ipart << std::endl; } } diff --git a/test/test_sign.cpp b/test/test_sign.cpp index 74022e07a..c60afbdc2 100644 --- a/test/test_sign.cpp +++ b/test/test_sign.cpp @@ -13,11 +13,10 @@ #include #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; template void test_spots(RealType /*T*/, const char* /*type_name*/) diff --git a/test/test_students_t.cpp b/test/test_students_t.cpp index 111f9ff45..b3ac8c709 100644 --- a/test/test_students_t.cpp +++ b/test/test_students_t.cpp @@ -22,11 +22,10 @@ using boost::math::students_t_distribution; #include // for real_concept -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include using std::numeric_limits; diff --git a/test/test_toms748_solve.cpp b/test/test_toms748_solve.cpp index 5a0f9d16b..5dc249d15 100644 --- a/test/test_toms748_solve.cpp +++ b/test/test_toms748_solve.cpp @@ -11,7 +11,6 @@ #include #include #include -#include // // Test functor implements the same test cases as used by @@ -164,7 +163,7 @@ void run_test(T a, T b, int id, T p1, T p2) int test_main(int, char* []) { - std::cout << boost::detail::setprecision(18); + std::cout << std::setprecision(18); run_test(3.14/2, 3.14, 1); for(int i = 1; i <= 10; i += 1) @@ -244,7 +243,7 @@ int test_main(int, char* []) BOOST_CHECK(invocations < 3150); - std::cout << boost::detail::setprecision(18); + std::cout << std::setprecision(18); for(int n = 5; n <= 100; n += 10) run_test(sqrt(double(n)), double(n+1), 16, (double)n, 0.4); @@ -262,7 +261,7 @@ int test_main(int, char* []) true, boost::math::tools::eps_tolerance(std::numeric_limits::digits), c); - std::cout << boost::detail::setprecision(18); + std::cout << std::setprecision(18); std::cout << "Function " << 4 << "\n Result={" << r.first << ", " << r.second << "} total calls=" << toms748tester::total_calls() << "\n\n"; toms748tester::reset(); BOOST_CHECK(c < 20); diff --git a/test/test_triangular.cpp b/test/test_triangular.cpp index 802934681..c9e0073ec 100644 --- a/test/test_triangular.cpp +++ b/test/test_triangular.cpp @@ -24,8 +24,6 @@ using boost::math::triangular_distribution; #include #include -#include -#include #include using std::cout; using std::endl; @@ -33,8 +31,8 @@ using std::scientific; using std::fixed; using std::left; using std::right; -using boost::detail::setw; -using boost::detail::setprecision; +using std::setw; +using std::setprecision; using std::showpos; #include using std::numeric_limits; @@ -639,10 +637,10 @@ int test_main(int, char* []) BOOST_CHECK_EQUAL(quantile(complement(*dists[i], 1.)), quantile(*dists[i], 0.)); BOOST_CHECK_CLOSE_FRACTION(quantile(*dists[i], 0.5), quantile(complement(*dist, 0.5)), tol5eps); // OK BOOST_CHECK_CLOSE_FRACTION(quantile(*dists[i], 0.98), quantile(complement(*dist, 1. - 0.98)),tol5eps); - // cout << boost::detail::setprecision(17) << median(*dist) << endl; + // cout << setprecision(17) << median(*dist) << endl; } - cout << showpos << boost::detail::setprecision(2) << endl; + cout << showpos << setprecision(2) << endl; //triangular_distribution& dist = trim12; for (unsigned i = 0; i < sizeof(xs) /sizeof(double); i++) @@ -650,13 +648,13 @@ int test_main(int, char* []) double x = xs[i] * (trim12.upper() - trim12.lower()) + trim12.lower(); double dx = cdf(trim12, x); double cx = cdf(complement(trim12, x)); - //cout << fixed << showpos << boost::detail::setprecision(3) + //cout << fixed << showpos << setprecision(3) // << xs[i] << ", " << x << ", " << pdf(trim12, x) << ", " << dx << ", " << cx << ",, " ; BOOST_CHECK_CLOSE_FRACTION(cx, 1 - dx, tol500eps); // cx == 1 - dx - // << boost::detail::setprecision(2) << scientific << cr - x << ", " // difference x - quan(cdf) - // << boost::detail::setprecision(3) << fixed + // << setprecision(2) << scientific << cr - x << ", " // difference x - quan(cdf) + // << setprecision(3) << fixed // << quantile(trim12, dx) << ", " // << quantile(complement(trim12, 1 - dx)) << ", " // << quantile(complement(trim12, cx)) << ", " diff --git a/test/test_uniform.cpp b/test/test_uniform.cpp index 72d7aeb93..b70cc9a58 100644 --- a/test/test_uniform.cpp +++ b/test/test_uniform.cpp @@ -23,11 +23,10 @@ using boost::math::uniform_distribution; #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include using std::numeric_limits; diff --git a/test/test_weibull.cpp b/test/test_weibull.cpp index 6a491c910..3c4338a59 100644 --- a/test/test_weibull.cpp +++ b/test/test_weibull.cpp @@ -16,11 +16,10 @@ using boost::math::weibull_distribution; #include -#include #include using std::cout; using std::endl; - using boost::detail::setprecision; + using std::setprecision; #include using std::numeric_limits; diff --git a/tools/Jamfile.v2 b/tools/Jamfile.v2 index 6ec424258..0f8836e24 100644 --- a/tools/Jamfile.v2 +++ b/tools/Jamfile.v2 @@ -14,8 +14,6 @@ local ntl-path = [ modules.peek : NTL_PATH ] ; project : requirements - pathscale:-Wno-missing-braces - clang:-Wno-missing-braces gcc:-Wno-missing-braces darwin:-Wno-missing-braces acc:+W2068,2461,2236,4070,4069 diff --git a/tools/bessel_data.cpp b/tools/bessel_data.cpp index a947ca9b1..d3dfb3d8e 100644 --- a/tools/bessel_data.cpp +++ b/tools/bessel_data.cpp @@ -263,7 +263,7 @@ enum int main(int argc, char* argv[]) { - std::cout << boost::detail::setprecision(17) << std::scientific; + std::cout << std::setprecision(17) << std::scientific; std::cout << sph_bessel_j_bare(0., 0.1185395751953125e4) << std::endl; std::cout << sph_bessel_j_bare(22., 0.6540834903717041015625) << std::endl; diff --git a/tools/generate_rational_code.cpp b/tools/generate_rational_code.cpp index 76dc784c7..090175f84 100644 --- a/tools/generate_rational_code.cpp +++ b/tools/generate_rational_code.cpp @@ -4,7 +4,7 @@ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include -#include +#include #include #include #include diff --git a/tools/generate_test_values.cpp b/tools/generate_test_values.cpp index 1d8e749e1..78f16df33 100644 --- a/tools/generate_test_values.cpp +++ b/tools/generate_test_values.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include int main() { diff --git a/tools/igamma_temme_large_coef.cpp b/tools/igamma_temme_large_coef.cpp index e73aeab31..d84663890 100644 --- a/tools/igamma_temme_large_coef.cpp +++ b/tools/igamma_temme_large_coef.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include using namespace std; using namespace NTL; diff --git a/tools/lanczos_generator.cpp b/tools/lanczos_generator.cpp index 85708c1ed..f5bf59b63 100644 --- a/tools/lanczos_generator.cpp +++ b/tools/lanczos_generator.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include using boost::numeric::ublas::matrix;