2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Revert [67111] (addition of boost/detail/iomanip.hpp) and all the commits that depend on it. ([68137], [68140], [68141], [68154], and [68165]).

[SVN r68168]
This commit is contained in:
Steven Watanabe
2011-01-15 08:11:51 +00:00
parent a52fce70a8
commit 3524499fc0
99 changed files with 455 additions and 536 deletions

View File

@@ -19,14 +19,12 @@
// negative_binomial is the probability that k or fewer failures
// preceed the r th trial's success.
#include <ios>
#include <iostream>
#include <boost/detail/iomanip.hpp>
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 <limits>
@@ -65,10 +63,10 @@ int main()
// Compare with the cdf
double cdf8 = cdf(mynbdist, static_cast<double>(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<double>(k)) // cdf = 0.40025683281803687
<< ", difference = " // difference = 0.50000000000000000
<< boost::detail::setprecision(1) << diff/ (std::numeric_limits<double>::epsilon() * sum)
<< setprecision(1) << diff/ (std::numeric_limits<double>::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<double>(k))
<< left << boost::detail::setw(25) << cdf(mynbdist, static_cast<double>(k))
cout << right << setprecision(17) << showpoint
<< right << setw(3) << k << ", "
<< left << setw(25) << pdf(mynbdist, static_cast<double>(k))
<< left << setw(25) << cdf(mynbdist, static_cast<double>(k))
<< endl;
}
cout << endl;