|
Boost-Commit : |
From: john_at_[hidden]
Date: 2007-10-16 05:32:46
Author: johnmaddock
Date: 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
New Revision: 40079
URL: http://svn.boost.org/trac/boost/changeset/40079
Log:
Fixed lots of "inspect" issues: bad hyperlinks, tabs in source and missing licenses.
Tweaked some error levels again.
Text files modified:
trunk/boost/math/bindings/rr.hpp | 10
trunk/boost/math/distributions/binomial.hpp | 14 +-
trunk/boost/math/distributions/cauchy.hpp | 8
trunk/boost/math/distributions/chi_squared.hpp | 6
trunk/boost/math/distributions/exponential.hpp | 10
trunk/boost/math/distributions/extreme_value.hpp | 10
trunk/boost/math/distributions/fisher_f.hpp | 10
trunk/boost/math/distributions/gamma.hpp | 10
trunk/boost/math/distributions/lognormal.hpp | 10
trunk/boost/math/distributions/negative_binomial.hpp | 12 +-
trunk/boost/math/distributions/normal.hpp | 10
trunk/boost/math/distributions/poisson.hpp | 24 ++--
trunk/boost/math/distributions/rayleigh.hpp | 10
trunk/boost/math/distributions/students_t.hpp | 12 +-
trunk/boost/math/distributions/uniform.hpp | 10
trunk/boost/math/distributions/weibull.hpp | 10
trunk/boost/math/policies/error_handling.hpp | 8
trunk/boost/math/special_functions/cbrt.hpp | 24 ++--
trunk/boost/math/special_functions/math_fwd.hpp | 6
trunk/boost/math/special_functions/sign.hpp | 4
trunk/boost/math/tools/config.hpp | 42 ++++----
trunk/boost/math/tools/fraction.hpp | 88 ++++++++--------
trunk/libs/math/doc/math.qbk | 7
trunk/libs/math/doc/sf_and_dist/background.qbk | 6 +
trunk/libs/math/doc/sf_and_dist/bessel_ik.qbk | 6 +
trunk/libs/math/doc/sf_and_dist/bessel_introduction.qbk | 6 +
trunk/libs/math/doc/sf_and_dist/bessel_jy.qbk | 10 +
trunk/libs/math/doc/sf_and_dist/bessel_spherical.qbk | 6 +
trunk/libs/math/doc/sf_and_dist/concepts.qbk | 10
trunk/libs/math/doc/sf_and_dist/contact_info.qbk | 8 +
trunk/libs/math/doc/sf_and_dist/distributions/bernoulli.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/binomial_example.qbk | 8 +
trunk/libs/math/doc/sf_and_dist/distributions/chi_squared_examples.qbk | 12 +
trunk/libs/math/doc/sf_and_dist/distributions/distribution_construction.qbk | 8 +
trunk/libs/math/doc/sf_and_dist/distributions/f_dist_example.qbk | 10 +
trunk/libs/math/doc/sf_and_dist/distributions/find_location_and_scale.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/gamma.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/lognormal.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/nag_library.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/negative_binomial_example.qbk | 8 +
trunk/libs/math/doc/sf_and_dist/distributions/normal_example.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/pareto.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/rayleigh.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/students_t_examples.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/triangular.qbk | 8 +
trunk/libs/math/doc/sf_and_dist/distributions/uniform.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/distributions/weibull.qbk | 6 +
trunk/libs/math/doc/sf_and_dist/ellint_legendre.qbk | 4
trunk/libs/math/doc/sf_and_dist/error_handling.qbk | 4
trunk/libs/math/doc/sf_and_dist/implementation.qbk | 2
trunk/libs/math/doc/sf_and_dist/overview.qbk | 7 +
trunk/libs/math/doc/sf_and_dist/performance.qbk | 15 +-
trunk/libs/math/doc/sf_and_dist/references.qbk | 2
trunk/libs/math/doc/sf_and_dist/remez.qbk | 6 +
trunk/libs/math/doc/sf_and_dist/result_type_calc.qbk | 6 +
trunk/libs/math/doc/sf_and_dist/thread_safety.qbk | 7 +
trunk/libs/math/example/c_error_policy_example.cpp | 4
trunk/libs/math/example/error_handling_example.cpp | 8
trunk/libs/math/example/error_policies_example.cpp | 8
trunk/libs/math/example/error_policy_example.cpp | 10
trunk/libs/math/example/neg_binomial_sample_sizes.cpp | 12 +-
trunk/libs/math/example/negative_binomial_example1.cpp | 2
trunk/libs/math/example/normal_misc_examples.cpp | 2
trunk/libs/math/example/students_t_example1.cpp | 48 ++++----
trunk/libs/math/example/students_t_example2.cpp | 64 ++++++------
trunk/libs/math/example/students_t_example3.cpp | 68 ++++++------
trunk/libs/math/test/assoc_legendre_p.ipp | 5
trunk/libs/math/test/binomial_data.ipp | 5
trunk/libs/math/test/binomial_large_data.ipp | 5
trunk/libs/math/test/binomial_quantile.ipp | 5
trunk/libs/math/test/cbrt_data.ipp | 5
trunk/libs/math/test/digamma_data.ipp | 5
trunk/libs/math/test/digamma_neg_data.ipp | 5
trunk/libs/math/test/digamma_root_data.ipp | 5
trunk/libs/math/test/digamma_small_data.ipp | 5
trunk/libs/math/test/ellint_k_data.ipp | 5
trunk/libs/math/test/erf_data.ipp | 5
trunk/libs/math/test/erf_inv_data.ipp | 5
trunk/libs/math/test/erf_large_data.ipp | 5
trunk/libs/math/test/erfc_inv_big_data.ipp | 5
trunk/libs/math/test/erfc_inv_data.ipp | 5
trunk/libs/math/test/functor.hpp | 5
trunk/libs/math/test/gamma_inv_big_data.ipp | 5
trunk/libs/math/test/gamma_inv_data.ipp | 5
trunk/libs/math/test/gamma_inv_small_data.ipp | 5
trunk/libs/math/test/handle_test_result.hpp | 5
trunk/libs/math/test/hermite.ipp | 5
trunk/libs/math/test/ibeta_int_data.ipp | 5
trunk/libs/math/test/ibeta_inv_data.ipp | 5
trunk/libs/math/test/ibeta_inva_data.ipp | 5
trunk/libs/math/test/igamma_int_data.ipp | 5
trunk/libs/math/test/igamma_inva_data.ipp | 5
trunk/libs/math/test/laguerre2.ipp | 5
trunk/libs/math/test/laguerre3.ipp | 5
trunk/libs/math/test/legendre_p.ipp | 5
trunk/libs/math/test/legendre_p_large.ipp | 5
trunk/libs/math/test/log1p_expm1_data.ipp | 5
trunk/libs/math/test/negative_binomial_quantile.ipp | 5
trunk/libs/math/test/poisson_quantile.ipp | 5
trunk/libs/math/test/spherical_harmonic.ipp | 5
trunk/libs/math/test/test_bernoulli.cpp | 6
trunk/libs/math/test/test_bessel_y.cpp | 2
trunk/libs/math/test/test_beta_dist.cpp | 2
trunk/libs/math/test/test_binomial.cpp | 50 ++++----
trunk/libs/math/test/test_cauchy.cpp | 210 ++++++++++++++++++++--------------------
trunk/libs/math/test/test_chi_squared.cpp | 4
trunk/libs/math/test/test_constants.cpp | 6
trunk/libs/math/test/test_dist_overloads.cpp | 14 +-
trunk/libs/math/test/test_error_handling.cpp | 12 +-
trunk/libs/math/test/test_exponential_dist.cpp | 48 ++++----
trunk/libs/math/test/test_extreme_value.cpp | 46 ++++----
trunk/libs/math/test/test_find_location.cpp | 2
trunk/libs/math/test/test_find_scale.cpp | 2
trunk/libs/math/test/test_fisher_f.cpp | 56 +++++-----
trunk/libs/math/test/test_gamma_dist.cpp | 28 ++--
trunk/libs/math/test/test_ibeta.cpp | 8 +
trunk/libs/math/test/test_ibeta_inv.cpp | 8 +
trunk/libs/math/test/test_ibeta_inv_ab.cpp | 2
trunk/libs/math/test/test_igamma_inv.cpp | 8 +
trunk/libs/math/test/test_lognormal.cpp | 36 +++---
trunk/libs/math/test/test_negative_binomial.cpp | 4
trunk/libs/math/test/test_normal.cpp | 38 +++---
trunk/libs/math/test/test_pareto.cpp | 30 ++--
trunk/libs/math/test/test_poisson.cpp | 120 +++++++++++-----------
trunk/libs/math/test/test_policy.cpp | 2
trunk/libs/math/test/test_rational_instances/test_rational.hpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_double1.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_double2.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_double3.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_double4.cpp | 4
trunk/libs/math/test/test_rational_instances/test_rational_double5.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_float1.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_float2.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_float3.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_float4.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_ldouble1.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_ldouble2.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_ldouble3.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_ldouble4.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_ldouble5.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_real_concept1.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_real_concept2.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_real_concept3.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_real_concept4.cpp | 5
trunk/libs/math/test/test_rational_instances/test_rational_real_concept5.cpp | 5
trunk/libs/math/test/test_rayleigh.cpp | 70 ++++++------
trunk/libs/math/test/test_students_t.cpp | 92 ++++++++--------
trunk/libs/math/test/test_tgamma_ratio.cpp | 18 +++
trunk/libs/math/test/test_uniform.cpp | 30 ++--
trunk/libs/math/test/test_weibull.cpp | 28 ++--
trunk/libs/math/test/tgamma_delta_ratio_data.ipp | 5
trunk/libs/math/test/tgamma_delta_ratio_int.ipp | 5
trunk/libs/math/test/tgamma_delta_ratio_int2.ipp | 5
trunk/libs/math/test/tgamma_ratio_data.ipp | 5
trunk/libs/math/tools/ellint_e_data.cpp | 5
trunk/libs/math/tools/ellint_f_data.cpp | 5
trunk/libs/math/tools/ellint_k_data.cpp | 5
trunk/libs/math/tools/factorial_tables.cpp | 4
trunk/libs/math/tools/generate_rational_test.cpp | 4
trunk/libs/math/tools/hermite_data.cpp | 4
trunk/libs/math/tools/laguerre_data.cpp | 4
trunk/libs/math/tools/legendre_data.cpp | 4
trunk/libs/math/tools/rational_tests.cpp | 4
trunk/libs/math/tools/spherical_harmonic_data.cpp | 4
164 files changed, 1341 insertions(+), 789 deletions(-)
Modified: trunk/boost/math/bindings/rr.hpp
==============================================================================
--- trunk/boost/math/bindings/rr.hpp (original)
+++ trunk/boost/math/bindings/rr.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -566,15 +566,15 @@
template<> inline boost::math::ntl::RR pi<boost::math::ntl::RR>(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(boost::math::ntl::RR))
{
- NTL::RR result;
- ComputePi(result);
- return result;
+ NTL::RR result;
+ ComputePi(result);
+ return result;
}
template<> inline boost::math::ntl::RR e<boost::math::ntl::RR>(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(boost::math::ntl::RR))
{
- NTL::RR result;
+ NTL::RR result;
result = 1;
- return exp(result);
+ return exp(result);
}
} // namespace constants
Modified: trunk/boost/math/distributions/binomial.hpp
==============================================================================
--- trunk/boost/math/distributions/binomial.hpp (original)
+++ trunk/boost/math/distributions/binomial.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -231,8 +231,8 @@
}
if (p <= pow(1 - success_fraction, trials))
{ // p <= pdf(dist, 0) == cdf(dist, 0)
- return 0; // So the only reasonable result is zero.
- } // And root finder would fail otherwise.
+ return 0; // So the only reasonable result is zero.
+ } // And root finder would fail otherwise.
// Solve for quantile numerically:
//
@@ -406,9 +406,9 @@
}; // template <class RealType, class Policy> class binomial_distribution
typedef binomial_distribution<> binomial;
- // typedef binomial_distribution<double> binomial;
- // IS now included since no longer a name clash with function binomial.
- //typedef binomial_distribution<double> binomial; // Reserved name of type double.
+ // typedef binomial_distribution<double> binomial;
+ // IS now included since no longer a name clash with function binomial.
+ //typedef binomial_distribution<double> binomial; // Reserved name of type double.
template <class RealType, class Policy>
const std::pair<RealType, RealType> range(const binomial_distribution<RealType, Policy>& dist)
@@ -676,8 +676,8 @@
// 1993, vol. 40, no3-4, pp. 185-189 (4 ref.)
// Bounds for median and 50 percetage point of binomial and negative binomial distribution
- // Metrika, ISSN 0026-1335 (Print) 1435-926X (Online)
- // Volume 41, Number 1 / December, 1994, DOI 10.1007/BF01895303
+ // Metrika, ISSN 0026-1335 (Print) 1435-926X (Online)
+ // Volume 41, Number 1 / December, 1994, DOI 10.1007/BF01895303
BOOST_MATH_STD_USING // ADL of std functions.
RealType p = dist.success_fraction();
RealType n = dist.trials();
Modified: trunk/boost/math/distributions/cauchy.hpp
==============================================================================
--- trunk/boost/math/distributions/cauchy.hpp (original)
+++ trunk/boost/math/distributions/cauchy.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -85,7 +85,7 @@
return 0.5;
}
result = -atan(1 / mx) / constants::pi<RealType>();
- return (((x > location) != complement) ? 1 - result : result);
+ return (((x > location) != complement) ? 1 - result : result);
} // cdf
template <class RealType, class Policy>
@@ -180,14 +180,14 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const cauchy_distribution<RealType, Policy>&)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity.
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const cauchy_distribution<RealType, Policy>& )
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
return std::pair<RealType, RealType>(-tools::max_value<RealType>(), tools::max_value<RealType>()); // - to + infinity.
}
Modified: trunk/boost/math/distributions/chi_squared.hpp
==============================================================================
--- trunk/boost/math/distributions/chi_squared.hpp (original)
+++ trunk/boost/math/distributions/chi_squared.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -58,14 +58,14 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const chi_squared_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>()); // 0 to + infinity.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>()); // 0 to + infinity.
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const chi_squared_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
return std::pair<RealType, RealType>(0, tools::max_value<RealType>()); // 0 to + infinity.
}
Modified: trunk/boost/math/distributions/exponential.hpp
==============================================================================
--- trunk/boost/math/distributions/exponential.hpp (original)
+++ trunk/boost/math/distributions/exponential.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -80,16 +80,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const exponential_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>());
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const exponential_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/extreme_value.hpp
==============================================================================
--- trunk/boost/math/distributions/extreme_value.hpp (original)
+++ trunk/boost/math/distributions/extreme_value.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -75,16 +75,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const extreme_value_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const extreme_value_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/fisher_f.hpp
==============================================================================
--- trunk/boost/math/distributions/fisher_f.hpp (original)
+++ trunk/boost/math/distributions/fisher_f.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -57,16 +57,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const fisher_f_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const fisher_f_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/gamma.hpp
==============================================================================
--- trunk/boost/math/distributions/gamma.hpp (original)
+++ trunk/boost/math/distributions/gamma.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -102,16 +102,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const gamma_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const gamma_distribution<RealType, Policy>& /* dist */)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/lognormal.hpp
==============================================================================
--- trunk/boost/math/distributions/lognormal.hpp (original)
+++ trunk/boost/math/distributions/lognormal.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -77,16 +77,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const lognormal_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x is >0 to +infinity.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const lognormal_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/negative_binomial.hpp
==============================================================================
--- trunk/boost/math/distributions/negative_binomial.hpp (original)
+++ trunk/boost/math/distributions/negative_binomial.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -259,16 +259,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const negative_binomial_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable k.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>()); // max_integer?
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>()); // max_integer?
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const negative_binomial_distribution<RealType, Policy>& /* dist */)
{ // Range of supported values for random variable k.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>()); // max_integer?
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>()); // max_integer?
}
template <class RealType, class Policy>
@@ -458,7 +458,7 @@
}
if (P <= pow(dist.success_fraction(), dist.successes()))
{ // p <= pdf(dist, 0) == cdf(dist, 0)
- return 0;
+ return 0;
}
/*
// Calculate quantile of negative_binomial using the inverse incomplete beta function.
Modified: trunk/boost/math/distributions/normal.hpp
==============================================================================
--- trunk/boost/math/distributions/normal.hpp (original)
+++ trunk/boost/math/distributions/normal.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -74,17 +74,17 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const normal_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const normal_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
}
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/poisson.hpp
==============================================================================
--- trunk/boost/math/distributions/poisson.hpp (original)
+++ trunk/boost/math/distributions/poisson.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -233,16 +233,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const poisson_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable k.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>()); // Max integer?
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>()); // Max integer?
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const poisson_distribution<RealType, Policy>& /* dist */)
{ // Range of supported values for random variable k.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
@@ -480,10 +480,10 @@
BOOST_MATH_STD_USING // ADL of std functions.
// if(p == 0) NOT necessarily zero!
// Not necessarily any special value of k because is unlimited.
- if (p <= exp(-dist.mean()))
- { // if p <= cdf for 0 events (== pdf for 0 events), then quantile must be zero.
- return 0;
- }
+ if (p <= exp(-dist.mean()))
+ { // if p <= cdf for 0 events (== pdf for 0 events), then quantile must be zero.
+ return 0;
+ }
return gamma_q_inva(dist.mean(), p, Policy()) - 1;
*/
typedef typename Policy::discrete_quantile_type discrete_type;
@@ -549,9 +549,9 @@
}
/*
if (-q <= boost::math::expm1(-dist.mean()))
- { // if q <= cdf(complement for 0 events, then quantile must be zero.
- return 0;
- }
+ { // if q <= cdf(complement for 0 events, then quantile must be zero.
+ return 0;
+ }
return gamma_p_inva(dist.mean(), q, Policy()) -1;
*/
typedef typename Policy::discrete_quantile_type discrete_type;
Modified: trunk/boost/math/distributions/rayleigh.hpp
==============================================================================
--- trunk/boost/math/distributions/rayleigh.hpp (original)
+++ trunk/boost/math/distributions/rayleigh.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -80,16 +80,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const rayleigh_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(static_cast<RealType>(1), max_value<RealType>());
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(static_cast<RealType>(1), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const rayleigh_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>((1), max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>((1), max_value<RealType>());
}
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/students_t.hpp
==============================================================================
--- trunk/boost/math/distributions/students_t.hpp (original)
+++ trunk/boost/math/distributions/students_t.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -63,16 +63,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const students_t_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const students_t_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
@@ -146,7 +146,7 @@
RealType z = degrees_of_freedom / (degrees_of_freedom + t2);
probability = ibeta(degrees_of_freedom / 2, static_cast<RealType>(0.5), z, Policy()) / 2;
}
- return (t > 0 ? 1 - probability : probability);
+ return (t > 0 ? 1 - probability : probability);
} // cdf
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/uniform.hpp
==============================================================================
--- trunk/boost/math/distributions/uniform.hpp (original)
+++ trunk/boost/math/distributions/uniform.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -140,16 +140,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const uniform_distribution<RealType, Policy>& /* dist */)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const uniform_distribution<RealType, Policy>& dist)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(dist.lower(), dist.upper());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(dist.lower(), dist.upper());
}
template <class RealType, class Policy>
Modified: trunk/boost/math/distributions/weibull.hpp
==============================================================================
--- trunk/boost/math/distributions/weibull.hpp (original)
+++ trunk/boost/math/distributions/weibull.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -102,16 +102,16 @@
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const weibull_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const weibull_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(0, max_value<RealType>());
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(0, max_value<RealType>());
}
template <class RealType, class Policy>
Modified: trunk/boost/math/policies/error_handling.hpp
==============================================================================
--- trunk/boost/math/policies/error_handling.hpp (original)
+++ trunk/boost/math/policies/error_handling.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -62,9 +62,9 @@
void raise_error(const char* function, const char* message)
{
if(function == 0)
- function = "Unknown function";
+ function = "Unknown function";
if(message == 0)
- message = "Cause unknown";
+ message = "Cause unknown";
std::string msg("Error in function ");
msg += (boost::format(function) % typeid(T).name()).str();
@@ -79,9 +79,9 @@
void raise_error(const char* function, const char* message, const T& val)
{
if(function == 0)
- function = "Unknown function";
+ function = "Unknown function";
if(message == 0)
- message = "Cause unknown";
+ message = "Cause unknown";
std::string msg("Error in function ");
msg += (boost::format(function) % typeid(T).name()).str();
Modified: trunk/boost/math/special_functions/cbrt.hpp
==============================================================================
--- trunk/boost/math/special_functions/cbrt.hpp (original)
+++ trunk/boost/math/special_functions/cbrt.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -14,18 +14,18 @@
namespace detail
{
- template <class T>
- struct cbrt_functor
- {
- cbrt_functor(T const& target) : a(target){}
- std::tr1::tuple<T, T, T> operator()(T const& z)
- {
- T sqr = z * z;
- return std::tr1::make_tuple(sqr * z - a, 3 * sqr, 6 * z);
- }
- private:
- T a;
- };
+ template <class T>
+ struct cbrt_functor
+ {
+ cbrt_functor(T const& target) : a(target){}
+ std::tr1::tuple<T, T, T> operator()(T const& z)
+ {
+ T sqr = z * z;
+ return std::tr1::make_tuple(sqr * z - a, 3 * sqr, 6 * z);
+ }
+ private:
+ T a;
+ };
template <class T, class Policy>
T cbrt_imp(T z, const Policy&)
Modified: trunk/boost/math/special_functions/math_fwd.hpp
==============================================================================
--- trunk/boost/math/special_functions/math_fwd.hpp (original)
+++ trunk/boost/math/special_functions/math_fwd.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -28,8 +28,8 @@
namespace boost
{
- namespace math
- { // Math functions (in roughly alphabetic order).
+ namespace math
+ { // Math functions (in roughly alphabetic order).
// Beta functions.
template <class RT1, class RT2>
@@ -621,7 +621,7 @@
template <class T>
bool isnormal BOOST_NO_MACRO_EXPAND(T t);
- } // namespace math
+ } // namespace math
} // namespace boost
#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
Modified: trunk/boost/math/special_functions/sign.hpp
==============================================================================
--- trunk/boost/math/special_functions/sign.hpp (original)
+++ trunk/boost/math/special_functions/sign.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -6,8 +6,7 @@
#ifndef BOOST_MATH_TOOLS_SIGN_HPP
#define BOOST_MATH_TOOLS_SIGN_HPP
-#include <cmath>
-#include <cstdlib>
+#include <boost/math/tools/config.hpp>
namespace boost{ namespace math{
@@ -26,6 +25,7 @@
template <class T>
inline T copysign(const T& x, const T& y)
{
+ BOOST_MATH_STD_USING
return fabs(x) * boost::math::sign(y);
}
Modified: trunk/boost/math/tools/config.hpp
==============================================================================
--- trunk/boost/math/tools/config.hpp (original)
+++ trunk/boost/math/tools/config.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -176,30 +176,30 @@
#ifdef __linux__
- #include <fenv.h>
+ #include <fenv.h>
- namespace boost{ namespace math{
- namespace detail
- {
- struct fpu_guard
- {
- fpu_guard()
- {
- fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
- feclearexcept(FE_ALL_EXCEPT);
- }
- ~fpu_guard()
- {
- fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
- }
- private:
- fexcept_t m_flags;
- };
+ namespace boost{ namespace math{
+ namespace detail
+ {
+ struct fpu_guard
+ {
+ fpu_guard()
+ {
+ fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
+ feclearexcept(FE_ALL_EXCEPT);
+ }
+ ~fpu_guard()
+ {
+ fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
+ }
+ private:
+ fexcept_t m_flags;
+ };
- } // namespace detail
- }} // namespaces
+ } // namespace detail
+ }} // namespaces
- #define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
+ #define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
#else // All other platforms.
#define BOOST_FPU_EXCEPTION_GUARD
#endif
Modified: trunk/boost/math/tools/fraction.hpp
==============================================================================
--- trunk/boost/math/tools/fraction.hpp (original)
+++ trunk/boost/math/tools/fraction.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -17,52 +17,52 @@
namespace detail
{
- template <class T>
- struct is_pair : public boost::false_type{};
+ template <class T>
+ struct is_pair : public boost::false_type{};
- template <class T, class U>
- struct is_pair<std::pair<T,U> > : public boost::true_type{};
+ template <class T, class U>
+ struct is_pair<std::pair<T,U> > : public boost::true_type{};
- template <class Gen>
- struct fraction_traits_simple
- {
- typedef typename Gen::result_type result_type;
- typedef typename Gen::result_type value_type;
-
- static result_type a(const value_type& v)
- {
- return 1;
- }
- static result_type b(const value_type& v)
- {
- return v;
- }
- };
-
- template <class Gen>
- struct fraction_traits_pair
- {
- typedef typename Gen::result_type value_type;
- typedef typename value_type::first_type result_type;
-
- static result_type a(const value_type& v)
- {
- return v.first;
- }
- static result_type b(const value_type& v)
- {
- return v.second;
- }
- };
-
- template <class Gen>
- struct fraction_traits
- : public boost::mpl::if_c<
- is_pair<typename Gen::result_type>::value,
- fraction_traits_pair<Gen>,
- fraction_traits_simple<Gen> >::type
- {
- };
+ template <class Gen>
+ struct fraction_traits_simple
+ {
+ typedef typename Gen::result_type result_type;
+ typedef typename Gen::result_type value_type;
+
+ static result_type a(const value_type& v)
+ {
+ return 1;
+ }
+ static result_type b(const value_type& v)
+ {
+ return v;
+ }
+ };
+
+ template <class Gen>
+ struct fraction_traits_pair
+ {
+ typedef typename Gen::result_type value_type;
+ typedef typename value_type::first_type result_type;
+
+ static result_type a(const value_type& v)
+ {
+ return v.first;
+ }
+ static result_type b(const value_type& v)
+ {
+ return v.second;
+ }
+ };
+
+ template <class Gen>
+ struct fraction_traits
+ : public boost::mpl::if_c<
+ is_pair<typename Gen::result_type>::value,
+ fraction_traits_pair<Gen>,
+ fraction_traits_simple<Gen> >::type
+ {
+ };
} // namespace detail
Modified: trunk/libs/math/doc/math.qbk
==============================================================================
--- trunk/libs/math/doc/math.qbk (original)
+++ trunk/libs/math/doc/math.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,5 +1,6 @@
[article Boost.Math
[quickbook 1.4]
+ [copyright 2007 Paul A. Bristow, Hubert Holin, John Maddock, Daryle Walker and Xiaogang Zhang]
[license
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
@@ -66,7 +67,7 @@
[[[@../octonion/html/index.html Octonions]]
[
-Octonions, like [@../../quaternions/html/index.html quaternions], are a relative of complex numbers.
+Octonions, like [@../quaternions/html/index.html quaternions], are a relative of complex numbers.
Octonions see some use in theoretical physics.
@@ -160,8 +161,8 @@
things is by using the formula ['[^i*i = j*j = k*k = -1]].
Quaternions (and their kin) are described in far more details in this
-other [@../../../quaternion/TQE.pdf document]
-(with [@../../../quaternion/TQE_EA.pdf errata and addenda]).
+other [@../../quaternion/TQE.pdf document]
+(with [@../../quaternion/TQE_EA.pdf errata and addenda]).
Some traditional constructs, such as the exponential, carry over without
too much change into the realms of quaternions, but other, such as taking
Modified: trunk/libs/math/doc/sf_and_dist/background.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/background.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/background.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -75,5 +75,11 @@
[endsect]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/bessel_ik.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/bessel_ik.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/bessel_ik.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -189,3 +189,9 @@
[endsect]
+[/
+ Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/bessel_introduction.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/bessel_introduction.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/bessel_introduction.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -116,3 +116,9 @@
[endsect]
+[/
+ Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/bessel_jy.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/bessel_jy.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/bessel_jy.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -54,7 +54,7 @@
[h4 Testing]
There are two sets of test values: spot values calculated using
-[@http//:functions.wolfram.com functions.wolfram.com],
+[@http://functions.wolfram.com functions.wolfram.com],
and a much larger set of tests computed using
a simplified version of this implementation
(with all the special case handling removed).
@@ -129,7 +129,7 @@
some remarkably inaccurate results with some of the test data (no significant figures
correct), and even GSL performs badly with some inputs to J[sub v]. Note that
by way of double-checking these results, the worst performing __cephes and GSL cases
-were recomputed using [@http//:functions.wolfram.com functions.wolfram.com],
+were recomputed using [@http://functions.wolfram.com functions.wolfram.com],
and the result checked against our test data: no errors in the test data were found.
[h4 Implementation]
@@ -253,3 +253,9 @@
[endsect]
+[/
+ Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/bessel_spherical.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/bessel_spherical.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/bessel_spherical.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -79,3 +79,9 @@
[endsect]
+[/
+ Copyright 2006 John Maddock, Paul A. Bristow and Xiaogang Zhang.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/concepts.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/concepts.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/concepts.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -16,7 +16,7 @@
Finally there is a high precision __lanczos suitable for use with `boost::math::ntl::RR`,
used at 1000-bit precision in
-[@../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp].
+[@../../../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp].
The approximation has a theoretical precision of > 90 decimal digits,
and an experimental precision of > 100 decimal digits. To use that
approximation, just include that header before any of the special
@@ -116,7 +116,7 @@
# The function `epsilon` can be synthesised from the others, so no
explicit specialisation is required provided the precision
of RealType does not vary at runtime (see the header
-[@../../../../../boost/math/tools/ntl.hpp boost/math/tools/ntl.hpp]
+[@../../../../../boost/math/bindings/rr.hpp boost/math/bindings/rr.hpp]
for an example where the precision does vary at runtime).
# The functions `digits`, `max_value` and `min_value`, all get synthesised
automatically from `std::numeric_limits`. However, if `numeric_limits`
@@ -185,7 +185,7 @@
You may be able to adapt an existing approximation from
[@../../../../../boost/math/special_functions/lanczos.hpp
boost/math/special_functions/lanczos.hpp] or
-[@../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp]:
+[@../../../tools/ntl_rr_lanczos.hpp libs/math/tools/ntl_rr_lanczos.hpp]:
you will need change
static_cast's to lexical_cast's, and the constants to /strings/
(in order to ensure the coefficients aren't truncated to long double)
@@ -280,7 +280,7 @@
been brought into the current scope with a using declaration.
There is a test program
-[@../../../teststd_real_concept_check.cpp libs/math/test/std_real_concept_check.cpp]
+[@../../../test/std_real_concept_check.cpp libs/math/test/std_real_concept_check.cpp]
that instantiates every template in this library with type
`std_real_concept` to verify it's usage of standard library functions.
@@ -335,7 +335,7 @@
for distribution types.
The test program
-[@../../../test/distribution_concept_check.cpp distribution_concept_check.cpp]
+[@../../../test/compile_test/distribution_concept_check.cpp distribution_concept_check.cpp]
is responsible for using `DistributionConcept` to verify that all the
distributions in this library conform to the
[link math_toolkit.using_udt.dist_concept Distribution concept].
Modified: trunk/libs/math/doc/sf_and_dist/contact_info.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/contact_info.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/contact_info.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -15,3 +15,11 @@
pbristow - at - hetp.u-net.com.
[endsect]
+
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/bernoulli.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/bernoulli.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/bernoulli.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -109,3 +109,10 @@
[endsect][/section:bernoulli_dist bernoulli]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/binomial_example.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/binomial_example.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/binomial_example.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -322,3 +322,11 @@
[endsect] [/section:binom_size_eg Estimating Sample Sizes for a Binomial Distribution.]
[endsect][/section:binom_eg Binomial Distribution]
+
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/chi_squared_examples.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/chi_squared_examples.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/chi_squared_examples.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -178,7 +178,7 @@
process to an established one.
The code for this example is contained in
-[@../../../chi_square_std_dev_test.cpp chi_square_std_dev_test.cpp], and
+[@../../../example/chi_square_std_dev_test.cpp chi_square_std_dev_test.cpp], and
we'll begin by defining the procedure that will print out the test
statistics:
@@ -372,7 +372,7 @@
note that the method used works on variance, and not standard deviation
as is usual for the Chi Squared Test.
-The code for this example is located in [@../../../chi_square_std_dev_test.cpp
+The code for this example is located in [@../../../example/chi_square_std_dev_test.cpp
chi_square_std_dev_test.cpp].
We begin by defining a procedure to print out the sample sizes required
@@ -490,3 +490,11 @@
[endsect][/section:chi_sq_size Estimating the Required Sample Sizes for a Chi-Square Test for the Standard Deviation]
[endsect][/section:cs_eg Chi Squared Distribution]
+
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/distribution_construction.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/distribution_construction.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/distribution_construction.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -7,3 +7,11 @@
[distribution_construction2]
[endsect] [/section:dist_construct_eg Distribution Construction Example]
+
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/f_dist_example.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/f_dist_example.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/f_dist_example.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -13,7 +13,7 @@
NIST Ceramics Division in 1996 in connection with a NIST/industry
ceramics consortium for strength optimization of ceramic strength.
-The example program is [@../example/f_test.cpp f_test.cpp],
+The example program is [@../../../example/f_test.cpp f_test.cpp],
program output has been deliberately made as similar as possible
to the DATAPLOT output in the corresponding
[@http://www.itl.nist.gov/div898/handbook/eda/section3/eda359.htm
@@ -210,3 +210,11 @@
for the better in our standard deviation.
[endsect][/section:f_eg F Distribution]
+
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/find_location_and_scale.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/find_location_and_scale.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/find_location_and_scale.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -30,3 +30,10 @@
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/gamma.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/gamma.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/gamma.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -129,3 +129,10 @@
[endsect][/section:normal_dist Normal]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/lognormal.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/lognormal.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/lognormal.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -110,3 +110,10 @@
[endsect][/section:normal_dist Normal]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/nag_library.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/nag_library.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/nag_library.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -51,3 +51,10 @@
[endsect] [/section:nag_library Comparison with C, R, FORTRAN-style Free Functions]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/negative_binomial_example.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/negative_binomial_example.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/negative_binomial_example.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -182,3 +182,11 @@
[endsect] [/section:negative_binomial_example1 Negative Binomial example 2.]
[endsect] [/section:neg_binom_eg Negative Binomial Distribution Examples]
+
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/normal_example.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/normal_example.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/normal_example.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -27,3 +27,10 @@
[endsect] [/section:normal_misc Some Miscellaneous Examples of the Normal Distribution]
[endsect] [/section:normal_example Normal Distribution Examples]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/pareto.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/pareto.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/pareto.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -105,3 +105,10 @@
[endsect][/section:pareto pareto]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/rayleigh.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/rayleigh.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/rayleigh.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -110,3 +110,10 @@
[endsect][/section:Rayleigh Rayleigh]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/students_t_examples.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/students_t_examples.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/students_t_examples.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -773,3 +773,10 @@
[endsect][/section:st_eg Student's t]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/triangular.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/triangular.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/triangular.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -154,9 +154,15 @@
* Evans, M.; Hastings, N.; and Peacock, B. "Triangular Distribution." Ch. 40 in Statistical Distributions, 3rd ed. New York: Wiley, pp. 187-188, 2000, ISBN - 0471371246]
* [@http://www.brighton-webs.co.uk/distributions/triangular.asp Brighton Webs Ltd. BW D-Calc 1.0 Distribution Calculator]
* [@http://www.worldscibooks.com/mathematics/etextbook/5720/5720_chap1.pdf The Triangular Distribution including its history.]
-* [@www.measurement.sk/2002/S1/Wimmer2.pdf Gejza Wimmer, Viktor Witkovsky and Tomas Duby,
+* [@http://www.measurement.sk/2002/S1/Wimmer2.pdf Gejza Wimmer, Viktor Witkovsky and Tomas Duby,
Measurement Science Review, Volume 2, Section 1, 2002, Proper Rounding Of The Measurement Results Under The Assumption Of Triangular Distribution.]
[endsect][/section:triangular_dist triangular]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/distributions/uniform.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/uniform.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/uniform.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -125,3 +125,10 @@
[endsect][/section:uniform_dist Uniform]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
Modified: trunk/libs/math/doc/sf_and_dist/distributions/weibull.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/distributions/weibull.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/distributions/weibull.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -119,3 +119,9 @@
[endsect][/section:weibull Weibull]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/ellint_legendre.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/ellint_legendre.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/ellint_legendre.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -188,7 +188,7 @@
[heading Testing]
The tests use a mixture of spot test values calculated using the online
-calculator at [@functions.wolfram.com
+calculator at [http://@functions.wolfram.com
functions.wolfram.com], and random test data generated using
NTL::RR at 1000-bit precision and this implementation.
@@ -296,7 +296,7 @@
[heading Testing]
The tests use a mixture of spot test values calculated using the online
-calculator at [@functions.wolfram.com
+calculator at [@http://functions.wolfram.com
functions.wolfram.com], and random test data generated using
NTL::RR at 1000-bit precision and this implementation.
Modified: trunk/libs/math/doc/sf_and_dist/error_handling.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/error_handling.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/error_handling.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,6 +1,6 @@
[section:error_handling Error Handling]
-[def __format [@../../../libs/format/index.html Boost.Format]]
+[def __format [@../../../../format/index.html Boost.Format]]
[heading Quick Reference]
@@ -159,7 +159,7 @@
This behaviour is chosen to assist compatibility with the behaviour of
['ISO/IEC 9899:1999 Programming languages - C]
and with the
-[@www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 6]:
+[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 6]:
[:['"Each of the functions declared above shall return a NaN (Not a Number)
if any argument value is a NaN, but it shall not report a domain error.
Modified: trunk/libs/math/doc/sf_and_dist/implementation.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/implementation.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/implementation.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -124,7 +124,7 @@
This implementation is believed to follow these proposals and to assist compatibility with
['ISO/IEC 9899:1999 Programming languages - C]
and with the
-[@www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 5].
+[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions, 2005-06-24, section 5.2.1, paragraph 5].
[link math_toolkit.main_overview.error_handling See also domain_error].
See __policy_ref for details of the error handling policies that should allow
Modified: trunk/libs/math/doc/sf_and_dist/overview.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/overview.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/overview.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -81,3 +81,10 @@
external graphing application.
[endsect] [/section:intro Introduction]
+
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/performance.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/performance.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/performance.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -361,12 +361,9 @@
[endsect]
-
-
-
-
-
-
-
-
-
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/references.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/references.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/references.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -34,7 +34,7 @@
[@http://bh0.physics.ubc.ca/People/matt/Doc/ThesesOthers/Phd/pugh.pdf pugh.pdf (application/pdf Object)]
Pugh Msc Thesis on the Lanczzos approximation to the gamma function.
-[@www.open-std.org/jtc1/sc22/wg21/docs/papers/2003 N1514, 03-0097, A Proposal to Add Mathematical Special Functions to the C++ Standard Library (version 2), Walter E. Brown]
+[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003 N1514, 03-0097, A Proposal to Add Mathematical Special Functions to the C++ Standard Library (version 2), Walter E. Brown]
[h4 Calculators* that we found (and used to cross-check - as far as their widely-varying accuracy allowed).]
Modified: trunk/libs/math/doc/sf_and_dist/remez.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/remez.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/remez.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -368,4 +368,10 @@
[endsect][/section:remez The Remez Method]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/result_type_calc.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/result_type_calc.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/result_type_calc.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -77,3 +77,9 @@
[endsect]
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/doc/sf_and_dist/thread_safety.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/thread_safety.qbk (original)
+++ trunk/libs/math/doc/sf_and_dist/thread_safety.qbk 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -21,3 +21,10 @@
This limitation may be addressed in a future release.
[endsect] [/section:threads Thread Safety]
+
+[/
+ Copyright 2006 John Maddock and Paul A. Bristow.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
Modified: trunk/libs/math/example/c_error_policy_example.cpp
==============================================================================
--- trunk/libs/math/example/c_error_policy_example.cpp (original)
+++ trunk/libs/math/example/c_error_policy_example.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -39,8 +39,8 @@
// std
#include <iostream>
- using std::cout;
- using std::endl;
+ using std::cout;
+ using std::endl;
int main()
{
Modified: trunk/libs/math/example/error_handling_example.cpp
==============================================================================
--- trunk/libs/math/example/error_handling_example.cpp (original)
+++ trunk/libs/math/example/error_handling_example.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -48,15 +48,15 @@
// Boost
#include <boost/math/distributions/students_t.hpp>
- using boost::math::students_t; // Probability of students_t(df, t).
+ using boost::math::students_t; // Probability of students_t(df, t).
// std
#include <iostream>
- using std::cout;
- using std::endl;
+ using std::cout;
+ using std::endl;
#include <stdexcept>
- using std::exception;
+ using std::exception;
/*`
Modified: trunk/libs/math/example/error_policies_example.cpp
==============================================================================
--- trunk/libs/math/example/error_policies_example.cpp (original)
+++ trunk/libs/math/example/error_policies_example.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -12,8 +12,8 @@
using boost::math::normal_distribution;
#include <boost/math/distributions/students_t.hpp>
- using boost::math::students_t; // Probability of students_t(df, t).
- using boost::math::students_t_distribution;
+ using boost::math::students_t; // Probability of students_t(df, t).
+ using boost::math::students_t_distribution;
// using namespace boost::math;
//.\error_policy_normal.cpp(30) : error C2872: 'policy' : ambiguous symbol
@@ -26,8 +26,8 @@
// std
#include <iostream>
- using std::cout;
- using std::endl;
+ using std::cout;
+ using std::endl;
using boost::math::policies::policy;
// Possible errors
Modified: trunk/libs/math/example/error_policy_example.cpp
==============================================================================
--- trunk/libs/math/example/error_policy_example.cpp (original)
+++ trunk/libs/math/example/error_policy_example.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -23,11 +23,11 @@
// std
#include <iostream>
- using std::cout;
- using std::endl;
+ using std::cout;
+ using std::endl;
#include <stdexcept>
- using std::exception;
+ using std::exception;
using boost::math::policies::policy;
using boost::math::policies::domain_error;
@@ -43,7 +43,7 @@
int main()
{ // Example of error handling of bad argument(s) to a distribution.
- cout << "Example error handling using Student's t function. " << endl;
+ cout << "Example error handling using Student's t function. " << endl;
double degrees_of_freedom = -1; double t = -1.; // Two 'bad' arguments!
@@ -71,7 +71,7 @@
"\n""Message from thrown exception was:\n " << e.what() << std::endl;
}
- return 0;
+ return 0;
} // int main()
/*
Modified: trunk/libs/math/example/neg_binomial_sample_sizes.cpp
==============================================================================
--- trunk/libs/math/example/neg_binomial_sample_sizes.cpp (original)
+++ trunk/libs/math/example/neg_binomial_sample_sizes.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -90,12 +90,12 @@
int main()
{
- find_number_of_trials(5, 0.5);
- find_number_of_trials(50, 0.5);
- find_number_of_trials(500, 0.5);
- find_number_of_trials(50, 0.1);
- find_number_of_trials(500, 0.1);
- find_number_of_trials(5, 0.9);
+ find_number_of_trials(5, 0.5);
+ find_number_of_trials(50, 0.5);
+ find_number_of_trials(500, 0.5);
+ find_number_of_trials(50, 0.1);
+ find_number_of_trials(500, 0.1);
+ find_number_of_trials(5, 0.9);
return 0;
} // int main()
Modified: trunk/libs/math/example/negative_binomial_example1.cpp
==============================================================================
--- trunk/libs/math/example/negative_binomial_example1.cpp (original)
+++ trunk/libs/math/example/negative_binomial_example1.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -426,7 +426,7 @@
*/
//] [/ negative_binomial_eg1_2]
}
- return 0;
+ return 0;
} // int main()
Modified: trunk/libs/math/example/normal_misc_examples.cpp
==============================================================================
--- trunk/libs/math/example/normal_misc_examples.cpp (original)
+++ trunk/libs/math/example/normal_misc_examples.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -74,7 +74,7 @@
/*`And all this you can do with a nanoscopic amount of work compared to
the team of *human computers* toiling with Milton Abramovitz and Irene Stegen
-at the US National Bureau of Standards (now [@www.nist.gov NIST]).
+at the US National Bureau of Standards (now [@http://www.nist.gov NIST]).
Starting in 1938, their "Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables",
was eventually published in 1964, and has been reprinted numerous times since.
(A major replacement is planned at [@http://dlmf.nist.gov Digital Library of Mathematical Functions]).
Modified: trunk/libs/math/example/students_t_example1.cpp
==============================================================================
--- trunk/libs/math/example/students_t_example1.cpp (original)
+++ trunk/libs/math/example/students_t_example1.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -43,46 +43,46 @@
// The Students't distribution function is described at
// http://en.wikipedia.org/wiki/Student%27s_t_distribution
#include <boost/math/distributions/students_t.hpp>
- using boost::math::students_t; // Probability of students_t(df, t).
+ using boost::math::students_t; // Probability of students_t(df, t).
#include <iostream>
- using std::cout; using std::endl;
+ using std::cout; using std::endl;
#include <iomanip>
- using std::setprecision;
+ using std::setprecision;
#include <cmath>
- using std::sqrt;
+ using std::sqrt;
int main()
{
- cout << "Example 1 using Student's t function. " << endl;
+ cout << "Example 1 using Student's t function. " << endl;
- // Example/test using tabulated value
+ // Example/test using tabulated value
// (deliberately coded as naively as possible).
- // Null hypothesis is that there is no difference (greater or less)
+ // Null hypothesis is that there is no difference (greater or less)
// between measured and standard.
- double degrees_of_freedom = values-1; // 3-1 = 2
+ double degrees_of_freedom = values-1; // 3-1 = 2
cout << "Measurement 1 = " << value[0] << ", measurement 2 = " << value[1] << ", measurement 3 = " << value[2] << endl;
- double mean = (value[0] + value[1] + value[2]) / static_cast<double>(values);
+ double mean = (value[0] + value[1] + value[2]) / static_cast<double>(values);
cout << "Standard = " << standard << ", mean = " << mean << ", (mean - standard) = " << mean - standard << endl;
- double sd = sqrt(((value[0] - mean) * (value[0] - mean) + (value[1] - mean) * (value[1] - mean) + (value[2] - mean) * (value[2] - mean))/ static_cast<double>(values-1));
- cout << "Standard deviation = " << sd << endl;
- if (sd == 0.)
- {
- cout << "Measured mean is identical to SRM value," << endl;
- cout << "so probability of no difference between measured and standard (the 'null hypothesis') is unity." << endl;
- return 0;
- }
-
- double t = (mean - standard) * std::sqrt(static_cast<double>(values)) / sd;
- cout << "Student's t = " << t << endl;
- cout.precision(2); // Useful accuracy is only a few decimal digits.
- cout << "Probability of Student's t is " << cdf(students_t(degrees_of_freedom), std::abs(t)) << endl;
+ double sd = sqrt(((value[0] - mean) * (value[0] - mean) + (value[1] - mean) * (value[1] - mean) + (value[2] - mean) * (value[2] - mean))/ static_cast<double>(values-1));
+ cout << "Standard deviation = " << sd << endl;
+ if (sd == 0.)
+ {
+ cout << "Measured mean is identical to SRM value," << endl;
+ cout << "so probability of no difference between measured and standard (the 'null hypothesis') is unity." << endl;
+ return 0;
+ }
+
+ double t = (mean - standard) * std::sqrt(static_cast<double>(values)) / sd;
+ cout << "Student's t = " << t << endl;
+ cout.precision(2); // Useful accuracy is only a few decimal digits.
+ cout << "Probability of Student's t is " << cdf(students_t(degrees_of_freedom), std::abs(t)) << endl;
// 0.91, is 1 tailed.
- // So there is insufficient evidence of a difference to meet a 95% (1 in 20) criterion.
+ // So there is insufficient evidence of a difference to meet a 95% (1 in 20) criterion.
- return 0;
+ return 0;
} // int main()
/*
Modified: trunk/libs/math/example/students_t_example2.cpp
==============================================================================
--- trunk/libs/math/example/students_t_example2.cpp (original)
+++ trunk/libs/math/example/students_t_example2.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -30,16 +30,16 @@
// http://en.wikipedia.org/wiki/Student%27s_t_distribution
#include <boost/math/distributions/students_t.hpp>
- using boost::math::students_t; // Probability of students_t(df, t).
+ using boost::math::students_t; // Probability of students_t(df, t).
#include <iostream>
- using std::cout;
- using std::endl;
+ using std::cout;
+ using std::endl;
#include <iomanip>
- using std::setprecision;
- using std::setw;
+ using std::setprecision;
+ using std::setw;
#include <cmath>
- using std::sqrt;
+ using std::sqrt;
// This example of a one-sided test is from:
//
@@ -58,39 +58,39 @@
int main()
{
- cout << "Example2 using Student's t function. ";
+ cout << "Example2 using Student's t function. ";
#if defined(__FILE__) && defined(__TIMESTAMP__)
- cout << " " << __FILE__ << ' ' << __TIMESTAMP__ << ' '<< _MSC_FULL_VER;
+ cout << " " << __FILE__ << ' ' << __TIMESTAMP__ << ' '<< _MSC_FULL_VER;
#endif
- cout << endl;
+ cout << endl;
- double sum = 0.;
- for (int value = 0; value < values; value++)
- { // Echo data and calculate mean.
- sum += data[value];
- cout << setw(4) << value << ' ' << setw(14) << data[value] << endl;
- }
- double mean = sum /static_cast<double>(values);
- cout << "Mean = " << mean << endl; // 25.2283
-
- double sd = 0.;
- for (int value = 0; value < values; value++)
- { // Calculate standard deviation.
- sd +=(data[value] - mean) * (data[value] - mean);
- }
- int degrees_of_freedom = values - 1; // Use the n-1 formula.
- sd /= degrees_of_freedom; // == variance.
+ double sum = 0.;
+ for (int value = 0; value < values; value++)
+ { // Echo data and calculate mean.
+ sum += data[value];
+ cout << setw(4) << value << ' ' << setw(14) << data[value] << endl;
+ }
+ double mean = sum /static_cast<double>(values);
+ cout << "Mean = " << mean << endl; // 25.2283
+
+ double sd = 0.;
+ for (int value = 0; value < values; value++)
+ { // Calculate standard deviation.
+ sd +=(data[value] - mean) * (data[value] - mean);
+ }
+ int degrees_of_freedom = values - 1; // Use the n-1 formula.
+ sd /= degrees_of_freedom; // == variance.
sd= sqrt(sd);
- cout << "Standard deviation = " << sd<< endl; // = 0.238279
+ cout << "Standard deviation = " << sd<< endl; // = 0.238279
- double t = (mean - reference) * sqrt(static_cast<double>(values))/ sd; //
- cout << "Student's t = " << t << ", with " << degrees_of_freedom << " degrees of freedom." << endl; // = 2.34725
+ double t = (mean - reference) * sqrt(static_cast<double>(values))/ sd; //
+ cout << "Student's t = " << t << ", with " << degrees_of_freedom << " degrees of freedom." << endl; // = 2.34725
- cout << "Probability of positive bias is " << cdf(students_t(degrees_of_freedom), t) << "."<< endl; // = 0.967108.
- // A 1-sided test because only testing for a positive bias.
- // If > 0.95 then greater than 1 in 20 conventional (arbitrary) requirement.
+ cout << "Probability of positive bias is " << cdf(students_t(degrees_of_freedom), t) << "."<< endl; // = 0.967108.
+ // A 1-sided test because only testing for a positive bias.
+ // If > 0.95 then greater than 1 in 20 conventional (arbitrary) requirement.
- return 0;
+ return 0;
} // int main()
/*
Modified: trunk/libs/math/example/students_t_example3.cpp
==============================================================================
--- trunk/libs/math/example/students_t_example3.cpp (original)
+++ trunk/libs/math/example/students_t_example3.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -30,14 +30,14 @@
// http://en.wikipedia.org/wiki/Student%27s_t_distribution
#include <boost/math/distributions/students_t.hpp>
- using boost::math::students_t; // Probability of students_t(df, t).
+ using boost::math::students_t; // Probability of students_t(df, t).
#include <iostream>
- using std::cout; using std::endl;
+ using std::cout; using std::endl;
#include <iomanip>
- using std::setprecision; using std::setw;
+ using std::setprecision; using std::setw;
#include <cmath>
- using std::sqrt;
+ using std::sqrt;
// This example of a two-sided test is from:
// B. M. Smith & M. B. Griffiths, Analyst, 1982, 107, 253,
@@ -64,38 +64,38 @@
int main()
{
- cout << "Example3 using Student's t function. " << endl;
- float mean_diff = 0.f;
- cout << "\n""Portion wet_oxidation Direct_extraction difference" << endl;
- for (int portion = 0; portion < portions; portion++)
- { // Echo data and differences.
- diffs[portion] = data[portion][0] - data[portion][1];
- mean_diff += diffs[portion];
- 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
-
- float sd_diffs = 0.f;
- for (int portion = 0; portion < portions; portion++)
- { // Calculate standard deviation of differences.
- sd_diffs +=(diffs[portion] - mean_diff) * (diffs[portion] - mean_diff);
- }
- int degrees_of_freedom = portions-1; // Use the n-1 formula.
- sd_diffs /= degrees_of_freedom;
- sd_diffs = sqrt(sd_diffs);
- cout << "Standard deviation of differences = " << sd_diffs << endl; // 4.99166
- // Standard deviation of differences = 4.99166
- double t = mean_diff * sqrt(static_cast<double>(portions))/ sd_diffs; // -0.70117
- cout << "Student's t = " << t << ", if " << degrees_of_freedom << " degrees of freedom." << endl;
- // Student's t = -0.70117, if 3 degrees of freedom.
- cout << "Probability of the means being different is "
+ cout << "Example3 using Student's t function. " << endl;
+ float mean_diff = 0.f;
+ cout << "\n""Portion wet_oxidation Direct_extraction difference" << endl;
+ for (int portion = 0; portion < portions; portion++)
+ { // Echo data and differences.
+ diffs[portion] = data[portion][0] - data[portion][1];
+ mean_diff += diffs[portion];
+ 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
+
+ float sd_diffs = 0.f;
+ for (int portion = 0; portion < portions; portion++)
+ { // Calculate standard deviation of differences.
+ sd_diffs +=(diffs[portion] - mean_diff) * (diffs[portion] - mean_diff);
+ }
+ int degrees_of_freedom = portions-1; // Use the n-1 formula.
+ sd_diffs /= degrees_of_freedom;
+ sd_diffs = sqrt(sd_diffs);
+ cout << "Standard deviation of differences = " << sd_diffs << endl; // 4.99166
+ // Standard deviation of differences = 4.99166
+ double t = mean_diff * sqrt(static_cast<double>(portions))/ sd_diffs; // -0.70117
+ cout << "Student's t = " << t << ", if " << degrees_of_freedom << " degrees of freedom." << endl;
+ // Student's t = -0.70117, if 3 degrees of freedom.
+ cout << "Probability of the means being different is "
<< 2.F * cdf(students_t(degrees_of_freedom), t) << "."<< endl; // 0.266846 * 2 = 0.533692
- // Double the probability because using a 'two-sided test' because
- // mean for 'Wet oxidation' could be either
- // greater OR LESS THAN for 'Direct extraction'.
+ // Double the probability because using a 'two-sided test' because
+ // mean for 'Wet oxidation' could be either
+ // greater OR LESS THAN for 'Direct extraction'.
- return 0;
+ return 0;
} // int main()
/*
Modified: trunk/libs/math/test/assoc_legendre_p.ipp
==============================================================================
--- trunk/libs/math/test/assoc_legendre_p.ipp (original)
+++ trunk/libs/math/test/assoc_legendre_p.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 400> assoc_legendre_p = {
SC_(3.755727291107177734375), SC_(-3), SC_(0.264718532562255859375), SC_(0.018682285998021253444483874168352748715136623066073),
Modified: trunk/libs/math/test/binomial_data.ipp
==============================================================================
--- trunk/libs/math/test/binomial_data.ipp (original)
+++ trunk/libs/math/test/binomial_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 3>, 159> binomial_data = { {
{ SC_(0.15e2), SC_(0.15e2), SC_(0.1e1) },
Modified: trunk/libs/math/test/binomial_large_data.ipp
==============================================================================
--- trunk/libs/math/test/binomial_large_data.ipp (original)
+++ trunk/libs/math/test/binomial_large_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 3>, 230> binomial_large_data = { {
{ SC_(0.174e3), SC_(0.4e1), SC_(0.36890001e8) },
Modified: trunk/libs/math/test/binomial_quantile.ipp
==============================================================================
--- trunk/libs/math/test/binomial_quantile.ipp (original)
+++ trunk/libs/math/test/binomial_quantile.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 5>, 4032> binomial_quantile_data = {{
{ SC_(2), SC_(0.12698681652545928955078125), SC_(0.12698681652545928955078125), SC_(0), SC_(0.28467385230321224203411154382440248724380832183117) },
Modified: trunk/libs/math/test/cbrt_data.ipp
==============================================================================
--- trunk/libs/math/test/cbrt_data.ipp (original)
+++ trunk/libs/math/test/cbrt_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 85> cbrt_data = { {
{ SC_(0.266297021326439287136622624529991298914e-12), SC_(0.1888421455001568264216782004847867296461e-37) },
Modified: trunk/libs/math/test/digamma_data.ipp
==============================================================================
--- trunk/libs/math/test/digamma_data.ipp (original)
+++ trunk/libs/math/test/digamma_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 500> digamma_data = { {
{ SC_(2.818432331085205078125), SC_(0.8484115700906551606307984398000472347785) },
Modified: trunk/libs/math/test/digamma_neg_data.ipp
==============================================================================
--- trunk/libs/math/test/digamma_neg_data.ipp (original)
+++ trunk/libs/math/test/digamma_neg_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 200> digamma_neg_data = { {
{ SC_(-99.7181549072265625), SC_(2.03892909952497242038694056382195623059) },
Modified: trunk/libs/math/test/digamma_root_data.ipp
==============================================================================
--- trunk/libs/math/test/digamma_root_data.ipp (original)
+++ trunk/libs/math/test/digamma_root_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 200> digamma_root_data = { {
{ SC_(1.39999997615814208984375), SC_(-0.06138456903152256550686860248931989075643) },
Modified: trunk/libs/math/test/digamma_small_data.ipp
==============================================================================
--- trunk/libs/math/test/digamma_small_data.ipp (original)
+++ trunk/libs/math/test/digamma_small_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 33> digamma_small_data = { {
{ SC_(0.1690093176520690576580818742513656616211e-8), SC_(-591683355.0172646248558707395909205014789) },
Modified: trunk/libs/math/test/ellint_k_data.ipp
==============================================================================
--- trunk/libs/math/test/ellint_k_data.ipp (original)
+++ trunk/libs/math/test/ellint_k_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 100> ellint_k_data = {
SC_(-0.99042308330535888671875e0), SC_(0.3377711175347896212115917173531827081735908096628e1),
Modified: trunk/libs/math/test/erf_data.ipp
==============================================================================
--- trunk/libs/math/test/erf_data.ipp (original)
+++ trunk/libs/math/test/erf_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 3>, 500> erf_data = { {
{ SC_(-7.954905033111572265625), SC_(-0.9999999999999999999999999999768236114552), SC_(1.999999999999999999999999999976823611455) },
Modified: trunk/libs/math/test/erf_inv_data.ipp
==============================================================================
--- trunk/libs/math/test/erf_inv_data.ipp (original)
+++ trunk/libs/math/test/erf_inv_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 100> erf_inv_data = { {
{ SC_(-0.990433037281036376953125), SC_(-1.832184533179510927322805923563700329767) },
Modified: trunk/libs/math/test/erf_large_data.ipp
==============================================================================
--- trunk/libs/math/test/erf_large_data.ipp (original)
+++ trunk/libs/math/test/erf_large_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 3>, 300> erf_large_data = { {
{ SC_(8.2311115264892578125), SC_(0.9999999999999999999999999999997436415644), SC_(0.2563584356432915693836191701249115171878e-30) },
Modified: trunk/libs/math/test/erfc_inv_big_data.ipp
==============================================================================
--- trunk/libs/math/test/erfc_inv_big_data.ipp (original)
+++ trunk/libs/math/test/erfc_inv_big_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 200> erfc_inv_big_data = { {
{ SC_(0.5460825444184401149953083908674803067585e-4312), SC_(99.62016927389407649911084501709563799849) },
Modified: trunk/libs/math/test/erfc_inv_data.ipp
==============================================================================
--- trunk/libs/math/test/erfc_inv_data.ipp (original)
+++ trunk/libs/math/test/erfc_inv_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 2>, 100> erfc_inv_data = { {
{ SC_(0.00956696830689907073974609375), SC_(1.832184391051582711731256541599359331735) },
Modified: trunk/libs/math/test/functor.hpp
==============================================================================
--- trunk/libs/math/test/functor.hpp (original)
+++ trunk/libs/math/test/functor.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef BOOST_MATH_TEST_FUNCTOR_HPP
#define BOOST_MATH_TEST_FUNCTOR_HPP
Modified: trunk/libs/math/test/gamma_inv_big_data.ipp
==============================================================================
--- trunk/libs/math/test/gamma_inv_big_data.ipp (original)
+++ trunk/libs/math/test/gamma_inv_big_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 130> gamma_inv_big_data = { {
{ SC_(464.56927490234375), SC_(0.12698681652545928955078125), SC_(440.0905015614498663381793089656310373835539712118699915057655756381750702144551901256933419148259778), SC_(489.2489328115381710888005650788332818303123263238882523231037266766796974176786885492715539575179927) },
Modified: trunk/libs/math/test/gamma_inv_data.ipp
==============================================================================
--- trunk/libs/math/test/gamma_inv_data.ipp (original)
+++ trunk/libs/math/test/gamma_inv_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 200> gamma_inv_data = { {
{ SC_(9.754039764404296875), SC_(0.12698681652545928955078125), SC_(6.349849983781954486964960115093039567468747967664820851534065876063014180392060424555352423162443804), SC_(13.35954665556050630769710564071384909890705633863167415813992116806093647564994418684947673739937248) },
Modified: trunk/libs/math/test/gamma_inv_small_data.ipp
==============================================================================
--- trunk/libs/math/test/gamma_inv_small_data.ipp (original)
+++ trunk/libs/math/test/gamma_inv_small_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 229> gamma_inv_small_data = { {
{ SC_(0.1730655412757187150418758392333984375e-5), SC_(0.12698681652545928955078125), SC_(0.2239623606222809074122747811596115646210220735131141509259977248899758059576948436798908594057794725e-517862), SC_(0.4348301951174619607003912855228982264838968134589390827069898370149065135278987288014463439625604227e-34079) },
Modified: trunk/libs/math/test/handle_test_result.hpp
==============================================================================
--- trunk/libs/math/test/handle_test_result.hpp (original)
+++ trunk/libs/math/test/handle_test_result.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,4 +1,7 @@
-
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_MATH_HANDLE_TEST_RESULT
#define BOOST_MATH_HANDLE_TEST_RESULT
Modified: trunk/libs/math/test/hermite.ipp
==============================================================================
--- trunk/libs/math/test/hermite.ipp (original)
+++ trunk/libs/math/test/hermite.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 3>, 420> hermite = {
SC_(0.8e1), SC_(-0.804919189453125e3), SC_(0.45107507538695517471998224862706929168983312035236e26),
Modified: trunk/libs/math/test/ibeta_int_data.ipp
==============================================================================
--- trunk/libs/math/test/ibeta_int_data.ipp (original)
+++ trunk/libs/math/test/ibeta_int_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 7>, 1000> ibeta_int_data = { {
{ SC_(1), SC_(1), SC_(0.12707412242889404296875), SC_(0.12707412242889404296875), SC_(0.87292587757110595703125), SC_(0.12707412242889404296875), SC_(0.87292587757110595703125) },
Modified: trunk/libs/math/test/ibeta_inv_data.ipp
==============================================================================
--- trunk/libs/math/test/ibeta_inv_data.ipp (original)
+++ trunk/libs/math/test/ibeta_inv_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 5>, 1210> ibeta_inv_data = { {
{ SC_(0.104760829344741068780422210693359375e-4), SC_(39078.1875), SC_(0.913384497165679931640625), SC_(0.2135769916611873809373928693612157637794870746322109915739746618652569766882593624385400901395922558e-3760), SC_(0.6169146818683135737866366973021696361959736535710675458813428774517757535576031054239811928697394346e-101417) },
Modified: trunk/libs/math/test/ibeta_inva_data.ipp
==============================================================================
--- trunk/libs/math/test/ibeta_inva_data.ipp (original)
+++ trunk/libs/math/test/ibeta_inva_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 7>, 1100> ibeta_inva_data = { {
{ SC_(0.101913392427377402782440185546875e-4), SC_(0.3082362115383148193359375), SC_(0.1355634629726409912109375), SC_(0.6498233713152427462579302903941895526823485861809005407005756658138299437345439685916818979079350952e-4), SC_(0.1598220360006443400909761969445329244603859759388130816641624923434214075962489978723834186220509792e-5), SC_(0.1598250823507423266003361933591577902014719110010440833489018043541995851576985396009647692344594598e-5), SC_(0.6499023539055942142435327607856798948132754954188633069136984730655318067141056849740949064680308213e-4) },
Modified: trunk/libs/math/test/igamma_int_data.ipp
==============================================================================
--- trunk/libs/math/test/igamma_int_data.ipp (original)
+++ trunk/libs/math/test/igamma_int_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 6>, 140> igamma_int_data = { {
{ SC_(0.5), SC_(0.004999999888241291046142578125), SC_(1.631267845368323485191815380032984903074365412587098308286220239190324188420710121791871591309590004), SC_(0.9203443263332001265162236927545643793578786527087679769237787431564844748135321134774112708209554194), SC_(0.1411860055371925421063521033081602797231840435352888199275875506625870961703220596656577919527041757), SC_(0.07965567366679987348377630724543562064212134729123202307622125684351552518646788652258872917904458057) },
Modified: trunk/libs/math/test/igamma_inva_data.ipp
==============================================================================
--- trunk/libs/math/test/igamma_inva_data.ipp (original)
+++ trunk/libs/math/test/igamma_inva_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 435> igamma_inva_data = { {
{ SC_(0.11342023313045501708984375), SC_(0.097540400922298431396484375), SC_(1.035869900800721563193351335409353423054156223778352824799732510014114331303190861923913851617789576), SC_(0.05862165929221091309602935851268320728966552926925608108837955463403857541085640683871851098187935567) },
Modified: trunk/libs/math/test/laguerre2.ipp
==============================================================================
--- trunk/libs/math/test/laguerre2.ipp (original)
+++ trunk/libs/math/test/laguerre2.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 3>, 280> laguerre2 = {
SC_(0.5e1), SC_(0.9754039764404296875e2), SC_(-0.56218428868911115998451316426215010600803852349048e8),
Modified: trunk/libs/math/test/laguerre3.ipp
==============================================================================
--- trunk/libs/math/test/laguerre3.ipp (original)
+++ trunk/libs/math/test/laguerre3.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 2240> laguerre3 = {
SC_(0.6e1), SC_(0.4e1), SC_(0.9754039764404296875e2), SC_(0.61248773400035441372705568899743424188675775638604e9),
Modified: trunk/libs/math/test/legendre_p.ipp
==============================================================================
--- trunk/libs/math/test/legendre_p.ipp (original)
+++ trunk/libs/math/test/legendre_p.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 140> legendre_p = {
SC_(3), SC_(-0.804919183254241943359375), SC_(-0.09637879251279735399302410605920296560178428535437), SC_(-0.84585603807674271376114723023136351467791030262194),
Modified: trunk/libs/math/test/legendre_p_large.ipp
==============================================================================
--- trunk/libs/math/test/legendre_p_large.ipp (original)
+++ trunk/libs/math/test/legendre_p_large.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 160> legendre_p_large = {
SC_(29), SC_(-0.74602639675140380859375), SC_(0.050915219643735786802064817454102557266509665552523), SC_(-0.27118035040452065163236941090242943684321195237749),
Modified: trunk/libs/math/test/log1p_expm1_data.ipp
==============================================================================
--- trunk/libs/math/test/log1p_expm1_data.ipp (original)
+++ trunk/libs/math/test/log1p_expm1_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 3>, 80> log1p_expm1_data = { {
{ SC_(-0.69330310821533203125e0), SC_(-0.1181895342296499380302723361817935835636e1), SC_(-0.5000779577496508480606742934033661111325e0) },
Modified: trunk/libs/math/test/negative_binomial_quantile.ipp
==============================================================================
--- trunk/libs/math/test/negative_binomial_quantile.ipp (original)
+++ trunk/libs/math/test/negative_binomial_quantile.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 5>, 792> negative_binomial_quantile_data = {{
{ SC_(4.285762786865234375), SC_(0.12698681652545928955078125), SC_(0.097540400922298431396484375), SC_(11.568381290037563253305975817351444024377036234904), SC_(49.67581419477884086070549390307050513757197652133) },
Modified: trunk/libs/math/test/poisson_quantile.ipp
==============================================================================
--- trunk/libs/math/test/poisson_quantile.ipp (original)
+++ trunk/libs/math/test/poisson_quantile.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 619> poisson_quantile_data = {{
{ SC_(2.539736270904541015625), SC_(0.097540400922298431396484375), SC_(0.1236392659323415267286721455855935332272165776019), SC_(4.1794244675777288954971650240102219690023733491107) },
Modified: trunk/libs/math/test/spherical_harmonic.ipp
==============================================================================
--- trunk/libs/math/test/spherical_harmonic.ipp (original)
+++ trunk/libs/math/test/spherical_harmonic.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 6>, 1000> spherical_harmonic = {
SC_(0.2e1), SC_(0), SC_(-0.6223074436187744140625e1), SC_(-0.983176708221435546875e0), SC_(0.62736841735769885881246893757736785347239567286304e0), SC_(0),
Modified: trunk/libs/math/test/test_bernoulli.cpp
==============================================================================
--- trunk/libs/math/test/test_bernoulli.cpp (original)
+++ trunk/libs/math/test/test_bernoulli.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -210,9 +210,9 @@
int test_main(int, char* [])
{
BOOST_MATH_CONTROL_FP;
- // Check that can generate bernoulli distribution using both convenience methods:
- bernoulli_distribution<double> bn1(0.5); // Using default RealType double.
- boost::math::bernoulli bn2(0.5); // Using typedef.
+ // Check that can generate bernoulli distribution using both convenience methods:
+ bernoulli_distribution<double> bn1(0.5); // Using default RealType double.
+ boost::math::bernoulli bn2(0.5); // Using typedef.
BOOST_CHECK_EQUAL(bn1.success_fraction(), 0.5);
BOOST_CHECK_EQUAL(bn2.success_fraction(), 0.5);
Modified: trunk/libs/math/test/test_bessel_y.cpp
==============================================================================
--- trunk/libs/math/test/test_bessel_y.cpp (original)
+++ trunk/libs/math/test/test_bessel_y.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -151,7 +151,7 @@
".*", // stdlib
"Sun.*", // platform
largest_type, // test type(s)
- "Y[0N] Mathworld.*", // test data group
+ "Y[0N].*Mathworld.*", // test data group
".*", 2000, 2000); // test function
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_beta_dist.cpp
==============================================================================
--- trunk/libs/math/test/test_beta_dist.cpp (original)
+++ trunk/libs/math/test/test_beta_dist.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -21,7 +21,7 @@
// provided 40 decimal digits accuracy incomplete beta aka beta regularized == cdf
// http://www.ausvet.com.au/pprev/content.php?page=PPscript
-// mode 0.75 5/95% 0.9 alpha 7.39 beta 3.13
+// mode 0.75 5/95% 0.9 alpha 7.39 beta 3.13
// http://www.epi.ucdavis.edu/diagnostictests/betabuster.html
// Beta Buster also calculates alpha and beta from mode & percentile estimates.
// This is NOT (yet) implemented.
Modified: trunk/libs/math/test/test_binomial.cpp
==============================================================================
--- trunk/libs/math/test/test_binomial.cpp (original)
+++ trunk/libs/math/test/test_binomial.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -354,27 +354,27 @@
// so useful for testing 64-bit double accuracy.
// P = 0.25, n = 20, k = 0 to 20
- //0 C(20,0) * 0.25^0 * 0.75^20 0.00317121193893399322405457496643
- //1 C(20,1) * 0.25^1 * 0.75^19 0.02114141292622662149369716644287
- //2 C(20,2) * 0.25^2 * 0.75^18 0.06694780759971763473004102706909
- //3 C(20,3) * 0.25^3 * 0.75^17 0.13389561519943526946008205413818
- //4 C(20,4) * 0.25^4 * 0.75^16 0.18968545486586663173511624336242
- //5 C(20,5) * 0.25^5 * 0.75^15 0.20233115185692440718412399291992
- //6 C(20,6) * 0.25^6 * 0.75^14 0.16860929321410367265343666076660
- //7 C(20,7) * 0.25^7 * 0.75^13 0.11240619547606911510229110717773
- //8 C(20,8) * 0.25^8 * 0.75^12 0.06088668921620410401374101638793
- //9 C(20,9) * 0.25^9 * 0.75^11 0.02706075076275737956166267395019
- //10 C(20,10) * 0.25^10 * 0.75^10 0.00992227527967770583927631378173
- //11 C(20,11) * 0.25^11 * 0.75^9 0.00300675008475081995129585266113
- //12 C(20,12) * 0.25^12 * 0.75^8 0.00075168752118770498782396316528
- //13 C(20,13) * 0.25^13 * 0.75^7 0.00015419231203850358724594116210
- //14 C(20,14) * 0.25^14 * 0.75^6 0.00002569871867308393120765686035
- //15 C(20,15) * 0.25^15 * 0.75^5 0.00000342649582307785749435424804
- //16 C(20,16) * 0.25^16 * 0.75^4 0.00000035692664823727682232856750
- //17 C(20,17) * 0.25^17 * 0.75^3 0.00000002799424692057073116302490
- //18 C(20,18) * 0.25^18 * 0.75^2 0.00000000155523594003170728683471
- //19 C(20,19) * 0.25^19 * 0.75^1 0.00000000005456968210637569427490
- //20 C(20,20) * 0.25^20 * 0.75^0 0.00000000000090949470177292823791
+ //0 C(20,0) * 0.25^0 * 0.75^20 0.00317121193893399322405457496643
+ //1 C(20,1) * 0.25^1 * 0.75^19 0.02114141292622662149369716644287
+ //2 C(20,2) * 0.25^2 * 0.75^18 0.06694780759971763473004102706909
+ //3 C(20,3) * 0.25^3 * 0.75^17 0.13389561519943526946008205413818
+ //4 C(20,4) * 0.25^4 * 0.75^16 0.18968545486586663173511624336242
+ //5 C(20,5) * 0.25^5 * 0.75^15 0.20233115185692440718412399291992
+ //6 C(20,6) * 0.25^6 * 0.75^14 0.16860929321410367265343666076660
+ //7 C(20,7) * 0.25^7 * 0.75^13 0.11240619547606911510229110717773
+ //8 C(20,8) * 0.25^8 * 0.75^12 0.06088668921620410401374101638793
+ //9 C(20,9) * 0.25^9 * 0.75^11 0.02706075076275737956166267395019
+ //10 C(20,10) * 0.25^10 * 0.75^10 0.00992227527967770583927631378173
+ //11 C(20,11) * 0.25^11 * 0.75^9 0.00300675008475081995129585266113
+ //12 C(20,12) * 0.25^12 * 0.75^8 0.00075168752118770498782396316528
+ //13 C(20,13) * 0.25^13 * 0.75^7 0.00015419231203850358724594116210
+ //14 C(20,14) * 0.25^14 * 0.75^6 0.00002569871867308393120765686035
+ //15 C(20,15) * 0.25^15 * 0.75^5 0.00000342649582307785749435424804
+ //16 C(20,16) * 0.25^16 * 0.75^4 0.00000035692664823727682232856750
+ //17 C(20,17) * 0.25^17 * 0.75^3 0.00000002799424692057073116302490
+ //18 C(20,18) * 0.25^18 * 0.75^2 0.00000000155523594003170728683471
+ //19 C(20,19) * 0.25^19 * 0.75^1 0.00000000005456968210637569427490
+ //20 C(20,20) * 0.25^20 * 0.75^0 0.00000000000090949470177292823791
BOOST_CHECK_CLOSE(
@@ -483,7 +483,7 @@
kurtosis_excess(dist)
, static_cast<RealType>(-0.08333333333333333333333333333333333333L), tol2);
// Check kurtosis_excess == kurtosis -3;
- BOOST_CHECK_EQUAL(kurtosis(dist), static_cast<RealType>(3) + kurtosis_excess(dist));
+ BOOST_CHECK_EQUAL(kurtosis(dist), static_cast<RealType>(3) + kurtosis_excess(dist));
// special cases for PDF:
BOOST_CHECK_EQUAL(
@@ -693,10 +693,10 @@
int test_main(int, char* [])
{
BOOST_MATH_CONTROL_FP;
- // Check that can generate binomial distribution using one convenience methods:
- binomial_distribution<> mybn2(1., 0.5); // Using default RealType double.
+ // Check that can generate binomial distribution using one convenience methods:
+ binomial_distribution<> mybn2(1., 0.5); // Using default RealType double.
// but that
- // boost::math::binomial mybn1(1., 0.5); // Using typedef fails
+ // boost::math::binomial mybn1(1., 0.5); // Using typedef fails
// error C2039: 'binomial' : is not a member of 'boost::math'
// Basic sanity-check spot values.
Modified: trunk/libs/math/test/test_cauchy.cpp
==============================================================================
--- trunk/libs/math/test/test_cauchy.cpp (original)
+++ trunk/libs/math/test/test_cauchy.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -21,21 +21,21 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/cauchy.hpp>
- using boost::math::cauchy_distribution;
+ using boost::math::cauchy_distribution;
#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
+ using std::cout;
+ using std::endl;
template <class RealType>
void test_spots(RealType T)
{
// Check some bad parameters to the distribution,
- BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(0, 0), std::domain_error); // zero sd
- BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(0, -1), std::domain_error); // negative scale (shape)
+ BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(0, 0), std::domain_error); // zero sd
+ BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(0, -1), std::domain_error); // negative scale (shape)
cauchy_distribution<RealType> C01;
BOOST_CHECK_EQUAL(C01.location(), 0); // Check standard values.
@@ -51,8 +51,8 @@
BOOST_CHECK_EQUAL(cdf(complement(C01, +std::numeric_limits<RealType>::infinity())), 0); // x = + infinity, cdf = 0
BOOST_CHECK_EQUAL(cdf(complement(C01, -std::numeric_limits<RealType>::infinity())), 1); // x = - infinity, cdf = 1
BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(std::numeric_limits<RealType>::infinity(), static_cast<RealType>(1)), std::domain_error); // +infinite mean
- BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(-std::numeric_limits<RealType>::infinity(), static_cast<RealType>(1)), std::domain_error); // -infinite mean
- BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(static_cast<RealType>(0), std::numeric_limits<RealType>::infinity()), std::domain_error); // infinite sd
+ BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(-std::numeric_limits<RealType>::infinity(), static_cast<RealType>(1)), std::domain_error); // -infinite mean
+ BOOST_CHECK_THROW(boost::math::cauchy_distribution<RealType> nbad1(static_cast<RealType>(0), std::numeric_limits<RealType>::infinity()), std::domain_error); // infinite sd
}
if (std::numeric_limits<RealType>::has_quiet_NaN)
@@ -85,61 +85,61 @@
cauchy_distribution<RealType>(),
static_cast<RealType>(0.125)), // x
static_cast<RealType>(0.53958342416056554201085167134004L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-0.125)), // x
static_cast<RealType>(0.46041657583943445798914832865996L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.5)), // x
static_cast<RealType>(0.64758361765043327417540107622474L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-0.5)), // x
static_cast<RealType>(0.35241638234956672582459892377526L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(1.0)), // x
static_cast<RealType>(0.75), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-1.0)), // x
static_cast<RealType>(0.25), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(2.0)), // x
static_cast<RealType>(0.85241638234956672582459892377526L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-2.0)), // x
static_cast<RealType>(0.14758361765043327417540107622474L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(10.0)), // x
static_cast<RealType>(0.9682744825694464304850228813987L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-10.0)), // x
static_cast<RealType>(0.031725517430553569514977118601302L), // probability.
- tolerance); // %
+ tolerance); // %
//
// Complements:
@@ -149,61 +149,61 @@
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.125))), // x
static_cast<RealType>(0.46041657583943445798914832865996L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(-0.125))), // x
static_cast<RealType>(0.53958342416056554201085167134004L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.5))), // x
static_cast<RealType>(0.35241638234956672582459892377526L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(-0.5))), // x
static_cast<RealType>(0.64758361765043327417540107622474L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(1.0))), // x
static_cast<RealType>(0.25), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(-1.0))), // x
static_cast<RealType>(0.75), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(2.0))), // x
static_cast<RealType>(0.14758361765043327417540107622474L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(-2.0))), // x
static_cast<RealType>(0.85241638234956672582459892377526L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(10.0))), // x
static_cast<RealType>(0.031725517430553569514977118601302L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(-10.0))), // x
static_cast<RealType>(0.9682744825694464304850228813987L), // probability.
- tolerance); // %
+ tolerance); // %
//
// Quantiles:
@@ -213,61 +213,61 @@
cauchy_distribution<RealType>(),
static_cast<RealType>(0.53958342416056554201085167134004L)),
static_cast<RealType>(0.125),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.46041657583943445798914832865996L)),
static_cast<RealType>(-0.125),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.64758361765043327417540107622474L)),
static_cast<RealType>(0.5),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.35241638234956672582459892377526)),
static_cast<RealType>(-0.5),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.75)),
static_cast<RealType>(1.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.25)),
static_cast<RealType>(-1.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.85241638234956672582459892377526L)),
static_cast<RealType>(2.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.14758361765043327417540107622474L)),
static_cast<RealType>(-2.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.9682744825694464304850228813987L)),
static_cast<RealType>(10.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.031725517430553569514977118601302L)),
static_cast<RealType>(-10.0),
- tolerance); // %
+ tolerance); // %
//
// Quantile from complement:
@@ -277,61 +277,61 @@
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.46041657583943445798914832865996L))),
static_cast<RealType>(0.125),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.53958342416056554201085167134004L))),
static_cast<RealType>(-0.125),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.35241638234956672582459892377526L))),
static_cast<RealType>(0.5),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.64758361765043327417540107622474L))),
static_cast<RealType>(-0.5),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.25))),
static_cast<RealType>(1.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.75))),
static_cast<RealType>(-1.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.14758361765043327417540107622474L))),
static_cast<RealType>(2.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.85241638234956672582459892377526L))),
static_cast<RealType>(-2.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.031725517430553569514977118601302L))),
static_cast<RealType>(10.0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(),
static_cast<RealType>(0.9682744825694464304850228813987L))),
static_cast<RealType>(-10.0),
- tolerance); // %
+ tolerance); // %
//
// PDF
@@ -341,73 +341,73 @@
cauchy_distribution<RealType>(),
static_cast<RealType>(0.125)), // x
static_cast<RealType>(0.31341281101173235351410956479511L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-0.125)), // x
static_cast<RealType>(0.31341281101173235351410956479511L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(0.5)), // x
static_cast<RealType>(0.25464790894703253723021402139602L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-0.5)), // x
static_cast<RealType>(0.25464790894703253723021402139602L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(1.0)), // x
static_cast<RealType>(0.15915494309189533576888376337251L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-1.0)), // x
static_cast<RealType>(0.15915494309189533576888376337251L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(2.0)), // x
static_cast<RealType>(0.063661977236758134307553505349006L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-2.0)), // x
static_cast<RealType>(0.063661977236758134307553505349006L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(10.0)), // x
static_cast<RealType>(0.0031515830315226799162155200667825L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(),
static_cast<RealType>(-10.0)), // x
static_cast<RealType>(0.0031515830315226799162155200667825L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(2, 5),
static_cast<RealType>(1)), // x
static_cast<RealType>(0.061213439650728975295724524374044L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
cauchy_distribution<RealType>(-2, 0.25),
static_cast<RealType>(1)), // x
static_cast<RealType>(0.0087809623774838805941453110826215L), // probability.
- tolerance); // %
+ tolerance); // %
//
// The following test values were calculated using MathCad,
@@ -419,250 +419,250 @@
cauchy_distribution<RealType>(1, 1),
static_cast<RealType>(0.125)), // x
static_cast<RealType>(0.271189304634946L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(1, 1),
static_cast<RealType>(0.125))), // x
static_cast<RealType>(1 - 0.271189304634946L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(1, 1),
static_cast<RealType>(0.271189304634946L)), // x
static_cast<RealType>(0.125), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(1, 1),
static_cast<RealType>(1 - 0.271189304634946L))), // x
static_cast<RealType>(0.125), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(0.125)), // x
static_cast<RealType>(0.539583424160566L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(0.5)), // x
static_cast<RealType>(0.647583617650433L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(1)), // x
static_cast<RealType>(0.750000000000000), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(2)), // x
static_cast<RealType>(0.852416382349567), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(10)), // x
static_cast<RealType>(0.968274482569447), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(100)), // x
static_cast<RealType>(0.996817007235092), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(-0.125)), // x
static_cast<RealType>(0.460416575839434), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(-0.5)), // x
static_cast<RealType>(0.352416382349567), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(-1)), // x
static_cast<RealType>(0.2500000000000000), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(-2)), // x
static_cast<RealType>(0.147583617650433), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(-10)), // x
static_cast<RealType>(0.031725517430554), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(0, 1),
static_cast<RealType>(-100)), // x
static_cast<RealType>(3.18299276490824E-3), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(1, 5),
static_cast<RealType>(1.25)), // x
static_cast<RealType>(0.515902251256176), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(2, 2),
static_cast<RealType>(1.25)), // x
static_cast<RealType>(0.385799748780092), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(4, 0.125),
static_cast<RealType>(3)), // x
static_cast<RealType>(0.039583424160566), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(-2, static_cast<RealType>(0.0001)),
static_cast<RealType>(-3)), // x
static_cast<RealType>(3.1830988512275777e-5), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(4, 50),
static_cast<RealType>(-3)), // x
static_cast<RealType>(0.455724386698215), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(-4, 50),
static_cast<RealType>(-3)), // x
static_cast<RealType>(0.506365349100973), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(1, 5),
static_cast<RealType>(1.25))), // x
static_cast<RealType>(1-0.515902251256176), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(2, 2),
static_cast<RealType>(1.25))), // x
static_cast<RealType>(1-0.385799748780092), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(4, 0.125),
static_cast<RealType>(3))), // x
static_cast<RealType>(1-0.039583424160566), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
cauchy_distribution<RealType>(-2, static_cast<RealType>(0.001)),
static_cast<RealType>(-3)), // x
static_cast<RealType>(0.000318309780080539), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(4, 50),
static_cast<RealType>(-3))), // x
static_cast<RealType>(1-0.455724386698215), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(cauchy_distribution<RealType>(-4, 50),
static_cast<RealType>(-3))), // x
static_cast<RealType>(1-0.506365349100973), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(1, 5),
static_cast<RealType>(0.515902251256176)), // x
static_cast<RealType>(1.25), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(2, 2),
static_cast<RealType>(0.385799748780092)), // x
static_cast<RealType>(1.25), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(4, 0.125),
static_cast<RealType>(0.039583424160566)), // x
static_cast<RealType>(3), // probability.
- tolerance); // %
+ tolerance); // %
/*
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(-2, 0.0001),
static_cast<RealType>(-3)), // x
static_cast<RealType>(0.000015915494296), // probability.
- tolerance); // %
+ tolerance); // %
*/
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(4, 50),
static_cast<RealType>(0.455724386698215)), // x
static_cast<RealType>(-3), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(-4, 50),
static_cast<RealType>(0.506365349100973)), // x
static_cast<RealType>(-3), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(1, 5),
static_cast<RealType>(1-0.515902251256176))), // x
static_cast<RealType>(1.25), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(2, 2),
static_cast<RealType>(1-0.385799748780092))), // x
static_cast<RealType>(1.25), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(4, 0.125),
static_cast<RealType>(1-0.039583424160566))), // x
static_cast<RealType>(3), // probability.
- tolerance); // %
+ tolerance); // %
/*
BOOST_CHECK_CLOSE(
::boost::math::quantile(
cauchy_distribution<RealType>(-2, 0.0001),
static_cast<RealType>(-3)), // x
static_cast<RealType>(0.000015915494296), // probability.
- tolerance); // %
+ tolerance); // %
*/
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(4, 50),
static_cast<RealType>(1-0.455724386698215))), // x
static_cast<RealType>(-3), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(cauchy_distribution<RealType>(-4, 50),
static_cast<RealType>(1-0.506365349100973))), // x
static_cast<RealType>(-3), // probability.
- tolerance); // %
+ tolerance); // %
cauchy_distribution<RealType> dist; // default (0, 1)
BOOST_CHECK_EQUAL(
@@ -715,15 +715,15 @@
int test_main(int, char* [])
{
BOOST_MATH_CONTROL_FP;
- // Check that can generate cauchy distribution using the two convenience methods:
- boost::math::cauchy mycd1(1.); // Using typedef
- cauchy_distribution<> mycd2(1.); // Using default RealType double.
- cauchy_distribution<> C01; // Using default RealType double for Standard Cauchy.
+ // Check that can generate cauchy distribution using the two convenience methods:
+ boost::math::cauchy mycd1(1.); // Using typedef
+ cauchy_distribution<> mycd2(1.); // Using default RealType double.
+ cauchy_distribution<> C01; // Using default RealType double for Standard Cauchy.
BOOST_CHECK_EQUAL(C01.location(), 0); // Check standard values.
BOOST_CHECK_EQUAL(C01.scale(), 1);
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_chi_squared.cpp
==============================================================================
--- trunk/libs/math/test/test_chi_squared.cpp (original)
+++ trunk/libs/math/test/test_chi_squared.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -523,8 +523,8 @@
int test_main(int, char* [])
{
- BOOST_MATH_CONTROL_FP;
- // Check that can generate chi_squared distribution using the two convenience methods:
+ BOOST_MATH_CONTROL_FP;
+ // Check that can generate chi_squared distribution using the two convenience methods:
chi_squared_distribution<> mychisqr(8);
chi_squared mychisqr2(8);
Modified: trunk/libs/math/test/test_constants.cpp
==============================================================================
--- trunk/libs/math/test/test_constants.cpp (original)
+++ trunk/libs/math/test/test_constants.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -20,10 +20,10 @@
{
// Basic sanity checks for constants.
- RealType tolerance = static_cast<RealType>(2e-15); // double
- //cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl;
+ RealType tolerance = static_cast<RealType>(2e-15); // double
+ //cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl;
- using namespace boost::math::constants;
+ using namespace boost::math::constants;
using namespace std; // Help ADL of std exp, log...
using std::exp;
Modified: trunk/libs/math/test/test_dist_overloads.cpp
==============================================================================
--- trunk/libs/math/test/test_dist_overloads.cpp (original)
+++ trunk/libs/math/test/test_dist_overloads.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -10,15 +10,15 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/normal.hpp>
- using boost::math::normal_distribution;
+ using boost::math::normal_distribution;
#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
template <class RealType>
void test_spots(RealType)
@@ -27,7 +27,7 @@
// 2 eps as a percentage:
RealType tolerance = boost::math::tools::epsilon<RealType>() * 2 * 100;
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
for(int i = -4; i <= 4; ++i)
{
@@ -67,8 +67,8 @@
int test_main(int, char* [])
{
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_error_handling.cpp
==============================================================================
--- trunk/libs/math/test/test_error_handling.cpp (original)
+++ trunk/libs/math/test/test_error_handling.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -126,13 +126,13 @@
int test_main(int, char* [])
{
- // Test error handling.
- // (Parameter value, arbitrarily zero, only communicates the floating point type FPT).
- test_error(0.0F); // Test float.
- test_error(0.0); // Test double.
- test_error(0.0L); // Test long double.
+ // Test error handling.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type FPT).
+ test_error(0.0F); // Test float.
+ test_error(0.0); // Test double.
+ test_error(0.0L); // Test long double.
test_error(boost::math::concepts::real_concept(0.0L)); // Test concepts.
- return 0;
+ return 0;
} // int test_main(int, char* [])
/*
Modified: trunk/libs/math/test/test_exponential_dist.cpp
==============================================================================
--- trunk/libs/math/test/test_exponential_dist.cpp (original)
+++ trunk/libs/math/test/test_exponential_dist.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -10,15 +10,15 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/exponential.hpp>
- using boost::math::exponential_distribution;
+ using boost::math::exponential_distribution;
#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
template <class RealType>
void test_spot(RealType l, RealType x, RealType p, RealType q, RealType tolerance)
@@ -28,13 +28,13 @@
exponential_distribution<RealType>(l),
x),
p,
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(exponential_distribution<RealType>(l),
x)),
q,
- tolerance); // %
+ tolerance); // %
if(p < 0.999)
{
BOOST_CHECK_CLOSE(
@@ -42,7 +42,7 @@
exponential_distribution<RealType>(l),
p),
x,
- tolerance); // %
+ tolerance); // %
}
if(q < 0.999)
{
@@ -51,7 +51,7 @@
complement(exponential_distribution<RealType>(l),
q)),
x,
- tolerance); // %
+ tolerance); // %
}
}
@@ -72,7 +72,7 @@
{
cout << "Expect parameter T == 0!" << endl;
}
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
test_spot(
static_cast<RealType>(0.5), // lambda
@@ -166,63 +166,63 @@
exponential_distribution<RealType>(0.5),
static_cast<RealType>(0.125)), // x
static_cast<RealType>(0.46970653140673789305985541231115L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
exponential_distribution<RealType>(0.5),
static_cast<RealType>(5)), // x
static_cast<RealType>(0.04104249931194939758476433723358L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
exponential_distribution<RealType>(2),
static_cast<RealType>(0.125)), // x
static_cast<RealType>(1.5576015661428097364903405339566L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
exponential_distribution<RealType>(2),
static_cast<RealType>(5)), // x
static_cast<RealType>(9.0799859524969703071183031121101e-5L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::mean(
exponential_distribution<RealType>(2)),
static_cast<RealType>(0.5),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::standard_deviation(
exponential_distribution<RealType>(2)),
static_cast<RealType>(0.5),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::mode(
exponential_distribution<RealType>(2)),
static_cast<RealType>(0),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::median(
exponential_distribution<RealType>(4)),
static_cast<RealType>(0.693147180559945309417232121458176568075500134360255254) / 4,
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::skewness(
exponential_distribution<RealType>(2)),
static_cast<RealType>(2),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::kurtosis(
exponential_distribution<RealType>(2)),
static_cast<RealType>(9),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::kurtosis_excess(
exponential_distribution<RealType>(2)),
static_cast<RealType>(6),
- tolerance); // %
+ tolerance); // %
//
// Things that are errors:
@@ -255,11 +255,11 @@
int test_main(int, char* [])
{
// Check that can generate exponential distribution using the two convenience methods:
- boost::math::exponential mycexp1(1.); // Using typedef
- exponential_distribution<> myexp2(1.); // Using default RealType double.
+ boost::math::exponential mycexp1(1.); // Using typedef
+ exponential_distribution<> myexp2(1.); // Using default RealType double.
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_extreme_value.cpp
==============================================================================
--- trunk/libs/math/test/test_extreme_value.cpp (original)
+++ trunk/libs/math/test/test_extreme_value.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -9,15 +9,15 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/extreme_value.hpp>
- using boost::math::extreme_value_distribution;
+ using boost::math::extreme_value_distribution;
#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
template <class RealType>
void test_spot(RealType a, RealType b, RealType x, RealType p, RealType q, RealType tolerance)
@@ -27,13 +27,13 @@
extreme_value_distribution<RealType>(a, b),
x),
p,
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(extreme_value_distribution<RealType>(a, b),
x)),
q,
- tolerance); // %
+ tolerance); // %
if((p < 0.999) && (p > 0))
{
BOOST_CHECK_CLOSE(
@@ -41,7 +41,7 @@
extreme_value_distribution<RealType>(a, b),
p),
x,
- tolerance); // %
+ tolerance); // %
}
if((q < 0.999) && (q > 0))
{
@@ -50,7 +50,7 @@
complement(extreme_value_distribution<RealType>(a, b),
q)),
x,
- tolerance); // %
+ tolerance); // %
}
}
@@ -65,7 +65,7 @@
boost::math::tools::epsilon<RealType>());
tolerance *= 50 * 100;
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
// Results calculated by punching numbers into a calculator,
// and using the formula at http://mathworld.wolfram.com/ExtremeValueDistribution.html
@@ -103,56 +103,56 @@
extreme_value_distribution<RealType>(0.5, 2),
static_cast<RealType>(0.125)), // x
static_cast<RealType>(0.18052654830890205978204427757846L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
extreme_value_distribution<RealType>(1, 3),
static_cast<RealType>(5)), // x
static_cast<RealType>(0.0675057324099851209129017326286L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
extreme_value_distribution<RealType>(1, 3),
static_cast<RealType>(0)), // x
static_cast<RealType>(0.11522236828583456431277265757312L), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::mean(
extreme_value_distribution<RealType>(2, 3)),
static_cast<RealType>(3.731646994704598581819536270246L),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::standard_deviation(
extreme_value_distribution<RealType>(-1, 0.5)),
static_cast<RealType>(0.6412749150809320477720181798355L),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::mode(
extreme_value_distribution<RealType>(2, 3)),
static_cast<RealType>(2),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::median(
extreme_value_distribution<RealType>(0, 1)),
static_cast<RealType>(+0.36651292058166432701243915823266946945426344783710526305367771367056),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::skewness(
extreme_value_distribution<RealType>(2, 3)),
static_cast<RealType>(1.1395470994046486574927930193898461120875997958366L),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::kurtosis(
extreme_value_distribution<RealType>(2, 3)),
static_cast<RealType>(5.4),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::kurtosis_excess(
extreme_value_distribution<RealType>(2, 3)),
static_cast<RealType>(2.4),
- tolerance); // %
+ tolerance); // %
//
// Things that are errors:
@@ -185,11 +185,11 @@
{
// Check that can generate extreme_value distribution using the two convenience methods:
- boost::math::extreme_value mycev1(1.); // Using typedef
- extreme_value_distribution<> myev2(1.); // Using default RealType double.
+ boost::math::extreme_value mycev1(1.); // Using typedef
+ extreme_value_distribution<> myev2(1.); // Using default RealType double.
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_find_location.cpp
==============================================================================
--- trunk/libs/math/test/test_find_location.cpp (original)
+++ trunk/libs/math/test/test_find_location.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -64,7 +64,7 @@
BOOST_CHECK_EQUAL(n.location(), 0); // aka mean.
BOOST_CHECK_EQUAL(n.scale(), 1); // aka standard_deviation.
- // Check for 'bad' arguments.
+ // Check for 'bad' arguments.
BOOST_CHECK_THROW(find_location<normal>(0., -1., 0.), std::domain_error); // p below 0 to 1.
BOOST_CHECK_THROW(find_location<normal>(0., 2., 0.), std::domain_error); // p above 0 to 1.
BOOST_CHECK_THROW(find_location<normal>(numeric_limits<double>::infinity(), 0.5, 0.),
Modified: trunk/libs/math/test/test_find_scale.cpp
==============================================================================
--- trunk/libs/math/test/test_find_scale.cpp (original)
+++ trunk/libs/math/test/test_find_scale.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -64,7 +64,7 @@
BOOST_CHECK_EQUAL(n.location(), 0); // aka mean.
BOOST_CHECK_EQUAL(n.scale(), 1); // aka standard_deviation.
- // Check for 'bad' arguments.
+ // Check for 'bad' arguments.
BOOST_CHECK_THROW(find_scale<normal>(0., -1., 0.), std::domain_error); // p below 0 to 1.
BOOST_CHECK_THROW(find_scale<normal>(0., 2., 0.), std::domain_error); // p above 0 to 1.
BOOST_CHECK_THROW(find_scale<normal>(numeric_limits<double>::infinity(), 0.5, 0.),
Modified: trunk/libs/math/test/test_fisher_f.cpp
==============================================================================
--- trunk/libs/math/test/test_fisher_f.cpp (original)
+++ trunk/libs/math/test/test_fisher_f.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -215,18 +215,18 @@
}
}
- // http://www.vias.org/simulations/simusoft_distcalc.html
- // Distcalc version 1.2 Copyright 2002 H Lohninger, TU Wein
- // H.Lohninger: Teach/Me Data Analysis, Springer-Verlag, Berlin-New York-Tokyo, 1999. ISBN 3-540-14743-8
- // The Windows calculator is available zipped distcalc.exe for download at:
- // http://www.vias.org/simulations/simu_stat.html
-
- // This interactive Windows program was used to find some combination for which the
- // result appears to be exact. No doubt this can be done analytically too,
- // by mathematicians!
+ // http://www.vias.org/simulations/simusoft_distcalc.html
+ // Distcalc version 1.2 Copyright 2002 H Lohninger, TU Wein
+ // H.Lohninger: Teach/Me Data Analysis, Springer-Verlag, Berlin-New York-Tokyo, 1999. ISBN 3-540-14743-8
+ // The Windows calculator is available zipped distcalc.exe for download at:
+ // http://www.vias.org/simulations/simu_stat.html
+
+ // This interactive Windows program was used to find some combination for which the
+ // result appears to be exact. No doubt this can be done analytically too,
+ // by mathematicians!
- // Some combinations for which the result is 'exact', or at least is to 40 decimal digits.
- // 40 decimal digits includes 128-bit significand User Defined Floating-Point types.
+ // Some combinations for which the result is 'exact', or at least is to 40 decimal digits.
+ // 40 decimal digits includes 128-bit significand User Defined Floating-Point types.
// These all pass tests at near epsilon accuracy for the floating-point type.
tolerance = boost::math::tools::epsilon<RealType>() * 5 * 100;
cout << "Tolerance = " << tolerance << "%." << endl;
@@ -236,7 +236,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(2.)/static_cast<RealType>(3.) ), // F
static_cast<RealType>(0.5), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -244,7 +244,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(1.6L))), // F
static_cast<RealType>(0.333333333333333333333333333333333333L), // probability.
- tolerance * 100); // needs higher tolerance at 128-bit precision - value not exact?
+ tolerance * 100); // needs higher tolerance at 128-bit precision - value not exact?
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -252,7 +252,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(6.5333333333333333333333333333333333L))), // F
static_cast<RealType>(0.125L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -260,7 +260,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(1.))), // F
static_cast<RealType>(0.5L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -268,7 +268,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(3.))), // F
static_cast<RealType>(0.25L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -276,7 +276,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(3.))), // F
static_cast<RealType>(0.25L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -284,7 +284,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(7.))), // F
static_cast<RealType>(0.125L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -292,7 +292,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(9.))), // F
static_cast<RealType>(0.1L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -300,7 +300,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(19.))), // F
static_cast<RealType>(0.05L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -308,7 +308,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(29.))), // F
static_cast<RealType>(0.03333333333333333333333333333333333333333L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -316,7 +316,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(99.))), // F
static_cast<RealType>(0.01L), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -324,7 +324,7 @@
static_cast<RealType>(4.)), // df2
static_cast<RealType>(9.))), // F
static_cast<RealType>(0.028L), // probability.
- tolerance*10); // not quite exact???
+ tolerance*10); // not quite exact???
BOOST_CHECK_CLOSE(
cdf(complement(fisher_f_distribution<RealType>(
@@ -332,7 +332,7 @@
static_cast<RealType>(8.)), // df2
static_cast<RealType>(1.))), // F
static_cast<RealType>(0.5L), // probability.
- tolerance);
+ tolerance);
// Inverse tests
@@ -342,7 +342,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(0.03333333333333333333333333333333333333333L))), // probability
static_cast<RealType>(29.), // F expected.
- tolerance*10);
+ tolerance*10);
BOOST_CHECK_CLOSE(
quantile(fisher_f_distribution<RealType>(
@@ -350,7 +350,7 @@
static_cast<RealType>(2.)), // df2
static_cast<RealType>(1.0L - 0.03333333333333333333333333333333333333333L)), // probability
static_cast<RealType>(29.), // F expected.
- tolerance*10);
+ tolerance*10);
// Also note limit cases for F(1, infinity) == normal distribution
@@ -505,8 +505,8 @@
{
// Check that can generate fisher distribution using the two convenience methods:
- boost::math::fisher_f myf1(1., 2); // Using typedef
- fisher_f_distribution<> myf2(1., 2); // Using default RealType double.
+ boost::math::fisher_f myf1(1., 2); // Using typedef
+ fisher_f_distribution<> myf2(1., 2); // Using default RealType double.
// Basic sanity-check spot values.
Modified: trunk/libs/math/test/test_gamma_dist.cpp
==============================================================================
--- trunk/libs/math/test/test_gamma_dist.cpp (original)
+++ trunk/libs/math/test/test_gamma_dist.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -20,13 +20,13 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/gamma.hpp>
- using boost::math::gamma_distribution;
+ using boost::math::gamma_distribution;
#include <boost/math/tools/test.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
#include <limits>
using std::numeric_limits;
@@ -49,14 +49,14 @@
gamma_distribution<RealType>(shape, scale), // distribution.
x), // random variable.
p, // probability.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(
gamma_distribution<RealType>(shape, scale), // distribution.
x)), // random variable.
q, // probability complement.
- tol); // %tolerance.
+ tol); // %tolerance.
if(p < 0.999)
{
BOOST_CHECK_CLOSE(
@@ -64,7 +64,7 @@
gamma_distribution<RealType>(shape, scale), // distribution.
p), // probability.
x, // random variable.
- tol); // %tolerance.
+ tol); // %tolerance.
}
if(q < 0.999)
{
@@ -74,7 +74,7 @@
gamma_distribution<RealType>(shape, scale), // distribution.
q)), // probability complement.
x, // random variable.
- tol); // %tolerance.
+ tol); // %tolerance.
}
// PDF:
BOOST_CHECK_CLOSE(
@@ -82,7 +82,7 @@
gamma_distribution<RealType>(shape, scale), // distribution.
x), // random variable.
NaivePDF(shape, scale, x), // PDF
- tol); // %tolerance.
+ tol); // %tolerance.
}
template <class RealType>
@@ -90,12 +90,12 @@
{
// Basic sanity checks
//
- // 15 decimal places expressed as a persentage.
+ // 15 decimal places expressed as a persentage.
// The first tests use values generated by MathCAD,
// and should be accurate to around double precision.
//
RealType tolerance = (std::max)(5e-14f, boost::math::tools::real_cast<float>(std::numeric_limits<RealType>::epsilon() * 20)) * 100;
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
check_gamma(
static_cast<RealType>(0.5),
@@ -128,8 +128,8 @@
// (it doesn't agree with MathCAD or this implementation).
// To be fair the incomplete gamma is tricky to get right in this area...
//
- tolerance = 1e-5f * 100; // 5 decimal places as a persentage
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ tolerance = 1e-5f * 100; // 5 decimal places as a persentage
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
check_gamma(
static_cast<RealType>(2),
@@ -216,7 +216,7 @@
int test_main(int, char* [])
{
// Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_ibeta.cpp
==============================================================================
--- trunk/libs/math/test/test_ibeta.cpp (original)
+++ trunk/libs/math/test/test_ibeta.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -507,14 +507,22 @@
#ifdef TEST_GSL
gsl_set_error_handler_off();
#endif
+#ifdef TEST_FLOAT
test_spots(0.0F);
+#endif
+#ifdef TEST_DOUBLE
test_spots(0.0);
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_spots(0.0L);
+#endif
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#ifdef TEST_REAL_CONCEPT
test_spots(boost::math::concepts::real_concept(0.1));
#endif
#endif
+#endif
#ifdef TEST_FLOAT
test_beta(0.1F, "float");
Modified: trunk/libs/math/test/test_ibeta_inv.cpp
==============================================================================
--- trunk/libs/math/test/test_ibeta_inv.cpp (original)
+++ trunk/libs/math/test/test_ibeta_inv.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -307,12 +307,20 @@
#ifdef TEST_GSL
gsl_set_error_handler_off();
#endif
+#ifdef TEST_FLOAT
test_spots(0.0F);
+#endif
+#ifdef TEST_DOUBLE
test_spots(0.0);
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_spots(0.0L);
+#endif
+#ifdef TEST_REAL_CONCEPT
test_spots(boost::math::concepts::real_concept(0.1));
#endif
+#endif
#ifdef TEST_FLOAT
test_beta(0.1F, "float");
Modified: trunk/libs/math/test/test_ibeta_inv_ab.cpp
==============================================================================
--- trunk/libs/math/test/test_ibeta_inv_ab.cpp (original)
+++ trunk/libs/math/test/test_ibeta_inv_ab.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -263,8 +263,6 @@
int test_main(int, char* [])
{
expected_results();
- boost::math::ibetac_invb(15.3268413543701171875f, 0.3082362115383148193359375f, 0.913384497165679931640625f);
- boost::math::ibetac(15.3268413543701171875f, 21.432123240471673235001418f, 0.3082362115383148193359375f);
#ifdef TEST_GSL
gsl_set_error_handler_off();
#endif
Modified: trunk/libs/math/test/test_igamma_inv.cpp
==============================================================================
--- trunk/libs/math/test/test_igamma_inv.cpp (original)
+++ trunk/libs/math/test/test_igamma_inv.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -367,15 +367,23 @@
BOOST_MATH_CONTROL_FP;
#ifndef BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#ifdef TEST_FLOAT
test_spots(0.0F, "float");
#endif
+#endif
+#ifdef TEST_DOUBLE
test_spots(0.0, "double");
+#endif
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#ifdef TEST_LDOUBLE
test_spots(0.0L, "long double");
+#endif
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#ifdef TEST_REAL_CONCEPT
test_spots(boost::math::concepts::real_concept(0.1), "real_concept");
#endif
#endif
+#endif
#ifndef BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
#ifdef TEST_FLOAT
Modified: trunk/libs/math/test/test_lognormal.cpp
==============================================================================
--- trunk/libs/math/test/test_lognormal.cpp (original)
+++ trunk/libs/math/test/test_lognormal.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -13,13 +13,13 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/lognormal.hpp>
- using boost::math::lognormal_distribution;
+ using boost::math::lognormal_distribution;
#include <boost/math/tools/test.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
#include <limits>
using std::numeric_limits;
#include <cassert>
@@ -32,27 +32,27 @@
lognormal_distribution<RealType>(loc, scale), // distribution.
x), // random variable.
p, // probability.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(
lognormal_distribution<RealType>(loc, scale), // distribution.
x)), // random variable.
q, // probability complement.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::quantile(
lognormal_distribution<RealType>(loc, scale), // distribution.
p), // probability.
x, // random variable.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(
lognormal_distribution<RealType>(loc, scale), // distribution.
q)), // probability complement.
x, // random variable.
- tol); // %tolerance.
+ tol); // %tolerance.
}
template <class RealType>
@@ -60,12 +60,12 @@
{
// Basic sanity checks.
- RealType tolerance = 5e-3 * 100;
- // Some tests only pass at 1e-4 because values generated by
+ RealType tolerance = 5e-3 * 100;
+ // Some tests only pass at 1e-4 because values generated by
// http://faculty.vassar.edu/lowry/VassarStats.html
// give only 5 or 6 *fixed* places, so small values have fewer digits.
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
using std::exp;
@@ -144,7 +144,7 @@
// Tests for PDF
//
tolerance = boost::math::tools::epsilon<RealType>() * 5 * 100; // 5 eps as a percentage
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
BOOST_CHECK_CLOSE(
pdf(lognormal_distribution<RealType>(), static_cast<RealType>(1)),
static_cast<RealType>(0.3989422804014326779399460599343818684759L), // 1/sqrt(2*pi)
@@ -176,7 +176,7 @@
tolerance = (std::max)(
boost::math::tools::epsilon<RealType>(),
static_cast<RealType>(boost::math::tools::epsilon<double>())) * 5 * 100; // 5 eps as a percentage
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
lognormal_distribution<RealType> dist(8, 3);
RealType x = static_cast<RealType>(0.125);
using namespace std; // ADL of std names.
@@ -258,9 +258,9 @@
int test_main(int, char* [])
{
- // Check that can generate lognormal distribution using the two convenience methods:
- boost::math::lognormal myf1(1., 2); // Using typedef
- lognormal_distribution<> myf2(1., 2); // Using default RealType double.
+ // Check that can generate lognormal distribution using the two convenience methods:
+ boost::math::lognormal myf1(1., 2); // Using typedef
+ lognormal_distribution<> myf2(1., 2); // Using default RealType double.
// Test range and support using double only,
// because it supports numeric_limits max for a pseudo-infinity.
@@ -269,8 +269,8 @@
BOOST_CHECK_EQUAL(support(myf2).first, 0); // support 0 to + infinity.
BOOST_CHECK_EQUAL(support(myf2).second, (std::numeric_limits<double>::max)());
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_negative_binomial.cpp
==============================================================================
--- trunk/libs/math/test/test_negative_binomial.cpp (original)
+++ trunk/libs/math/test/test_negative_binomial.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -793,8 +793,8 @@
{
// Check that can generate negative_binomial distribution using the two convenience methods:
using namespace boost::math;
- negative_binomial mynb1(2., 0.5); // Using typedef - default type is double.
- negative_binomial_distribution<> myf2(2., 0.5); // Using default RealType double.
+ negative_binomial mynb1(2., 0.5); // Using typedef - default type is double.
+ negative_binomial_distribution<> myf2(2., 0.5); // Using default RealType double.
// Basic sanity-check spot values.
Modified: trunk/libs/math/test/test_normal.cpp
==============================================================================
--- trunk/libs/math/test/test_normal.cpp (original)
+++ trunk/libs/math/test/test_normal.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -26,13 +26,13 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/normal.hpp>
- using boost::math::normal_distribution;
+ using boost::math::normal_distribution;
#include <boost/math/tools/test.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
#include <limits>
using std::numeric_limits;
@@ -54,41 +54,41 @@
normal_distribution<RealType>(mean, sd), // distribution.
x), // random variable.
p, // probability.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(
normal_distribution<RealType>(mean, sd), // distribution.
x)), // random variable.
q, // probability complement.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::quantile(
normal_distribution<RealType>(mean, sd), // distribution.
p), // probability.
x, // random variable.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(
normal_distribution<RealType>(mean, sd), // distribution.
q)), // probability complement.
x, // random variable.
- tol); // %tolerance.
+ tol); // %tolerance.
}
template <class RealType>
void test_spots(RealType)
{
// Basic sanity checks
- RealType tolerance = static_cast<RealType>(std::pow(10., -(4-2))); // 1e-4 (as %)
- // Some tests only pass at 1e-4 because values generated by
+ RealType tolerance = static_cast<RealType>(std::pow(10., -(4-2))); // 1e-4 (as %)
+ // Some tests only pass at 1e-4 because values generated by
// http://faculty.vassar.edu/lowry/VassarStats.html
// give only 5 or 6 *fixed* places, so small values have fewer digits.
// Check some bad parameters to the distribution,
- BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(0, 0), std::domain_error); // zero sd
- BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(0, -1), std::domain_error); // negative sd
+ BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(0, 0), std::domain_error); // zero sd
+ BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(0, -1), std::domain_error); // negative sd
// Tests on extreme values of random variate x, if has numeric_limit infinity etc.
normal_distribution<RealType> N01;
@@ -101,8 +101,8 @@
BOOST_CHECK_EQUAL(cdf(complement(N01, +std::numeric_limits<RealType>::infinity())), 0); // x = + infinity, c cdf = 0
BOOST_CHECK_EQUAL(cdf(complement(N01, -std::numeric_limits<RealType>::infinity())), 1); // x = - infinity, c cdf = 1
BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(std::numeric_limits<RealType>::infinity(), static_cast<RealType>(1)), std::domain_error); // +infinite mean
- BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(-std::numeric_limits<RealType>::infinity(), static_cast<RealType>(1)), std::domain_error); // -infinite mean
- BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(static_cast<RealType>(0), std::numeric_limits<RealType>::infinity()), std::domain_error); // infinite sd
+ BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(-std::numeric_limits<RealType>::infinity(), static_cast<RealType>(1)), std::domain_error); // -infinite mean
+ BOOST_CHECK_THROW(boost::math::normal_distribution<RealType> nbad1(static_cast<RealType>(0), std::numeric_limits<RealType>::infinity()), std::domain_error); // infinite sd
}
if (std::numeric_limits<RealType>::has_quiet_NaN)
@@ -115,7 +115,7 @@
BOOST_CHECK_THROW(quantile(complement(N01, +std::numeric_limits<RealType>::quiet_NaN())), std::domain_error); // p = + infinity
}
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
check_normal(
static_cast<RealType>(5),
@@ -284,8 +284,8 @@
int test_main(int, char* [])
{
// Check that can generate normal distribution using the two convenience methods:
- boost::math::normal myf1(1., 2); // Using typedef
- normal_distribution<> myf2(1., 2); // Using default RealType double.
+ boost::math::normal myf1(1., 2); // Using typedef
+ normal_distribution<> myf2(1., 2); // Using default RealType double.
boost::math::normal myn01; // Use default values.
// Note NOT myn01() as the compiler will interpret as a function!
@@ -293,8 +293,8 @@
BOOST_CHECK_EQUAL(myn01.mean(), myn01.location());
BOOST_CHECK_EQUAL(myn01.standard_deviation(), myn01.scale());
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_pareto.cpp
==============================================================================
--- trunk/libs/math/test/test_pareto.cpp (original)
+++ trunk/libs/math/test/test_pareto.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -24,13 +24,13 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/pareto.hpp>
- using boost::math::pareto_distribution;
+ using boost::math::pareto_distribution;
#include <boost/math/tools/test.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
#include <limits>
using std::numeric_limits;
@@ -233,11 +233,11 @@
int test_main(int, char* [])
{
// Check that can generate pareto distribution using the two convenience methods:
- boost::math::pareto myp1(1., 1); // Using typedef
- pareto_distribution<> myp2(1., 1); // Using default RealType double.
+ boost::math::pareto myp1(1., 1); // Using typedef
+ pareto_distribution<> myp2(1., 1); // Using default RealType double.
boost::math::pareto pareto11; // Use default values (location = 1, shape = 1).
// Note NOT pareto11() as the compiler will interpret as a function!
- // Basic sanity-check spot values.
+ // Basic sanity-check spot values.
BOOST_CHECK_EQUAL(pareto11.location(), 1); // Check defaults again.
BOOST_CHECK_EQUAL(pareto11.shape(), 1);
@@ -254,10 +254,10 @@
BOOST_CHECK_EQUAL(support(myp2).second, (numeric_limits<double>::max)());
// Check some bad parameters to the distribution.
- BOOST_CHECK_THROW(boost::math::pareto mypm1(-1, 1), std::domain_error); // Using typedef
- BOOST_CHECK_THROW(boost::math::pareto myp0(0, 1), std::domain_error); // Using typedef
- BOOST_CHECK_THROW(boost::math::pareto myp1m1(1, -1), std::domain_error); // Using typedef
- BOOST_CHECK_THROW(boost::math::pareto myp10(1, 0), std::domain_error); // Using typedef
+ BOOST_CHECK_THROW(boost::math::pareto mypm1(-1, 1), std::domain_error); // Using typedef
+ BOOST_CHECK_THROW(boost::math::pareto myp0(0, 1), std::domain_error); // Using typedef
+ BOOST_CHECK_THROW(boost::math::pareto myp1m1(1, -1), std::domain_error); // Using typedef
+ BOOST_CHECK_THROW(boost::math::pareto myp10(1, 0), std::domain_error); // Using typedef
// Check some moments that should fail because shape not big enough.
BOOST_CHECK_THROW(variance(myp2), std::domain_error);
@@ -268,9 +268,9 @@
// Test on extreme values of distribution parameters,
// using just double because it has numeric_limit infinity etc.
- BOOST_CHECK_THROW(boost::math::pareto mypinf1(+std::numeric_limits<double>::infinity(), 1), std::domain_error); // Using typedef
- BOOST_CHECK_THROW(boost::math::pareto myp1inf(1, +std::numeric_limits<double>::infinity()), std::domain_error); // Using typedef
- BOOST_CHECK_THROW(boost::math::pareto mypinf1(+std::numeric_limits<double>::infinity(), +std::numeric_limits<double>::infinity()), std::domain_error); // Using typedef
+ BOOST_CHECK_THROW(boost::math::pareto mypinf1(+std::numeric_limits<double>::infinity(), 1), std::domain_error); // Using typedef
+ BOOST_CHECK_THROW(boost::math::pareto myp1inf(1, +std::numeric_limits<double>::infinity()), std::domain_error); // Using typedef
+ BOOST_CHECK_THROW(boost::math::pareto mypinf1(+std::numeric_limits<double>::infinity(), +std::numeric_limits<double>::infinity()), std::domain_error); // Using typedef
// Test on extreme values of random variate x, using just double because it has numeric_limit infinity etc..
// No longer allow x to be + or - infinity, then these tests should throw.
@@ -296,7 +296,7 @@
BOOST_CHECK_THROW(cdf(pareto11, -(std::numeric_limits<double>::min)()), std::domain_error); // x = - min,
BOOST_CHECK_THROW(cdf(pareto11, -(std::numeric_limits<double>::max)()), std::domain_error); // x = - max,
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tol5eps = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tol5eps = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_poisson.cpp
==============================================================================
--- trunk/libs/math/test/test_poisson.cpp (original)
+++ trunk/libs/math/test/test_poisson.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -27,7 +27,7 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/poisson.hpp>
- using boost::math::poisson_distribution;
+ using boost::math::poisson_distribution;
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/tools/test.hpp> // for real_concept
@@ -35,11 +35,11 @@
// using boost::math::qamma_Q;
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
- using std::showpoint;
- using std::ios;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
+ using std::showpoint;
+ using std::ios;
#include <limits>
using std::numeric_limits;
@@ -47,10 +47,10 @@
void test_spots(RealType)
{
// Basic sanity checks, tolerance is about numeric_limits<RealType>::digits10 decimal places,
- // guaranteed for type RealType, eg 6 for float, 15 for double,
- // expressed as a percentage (so -2) for BOOST_CHECK_CLOSE,
+ // guaranteed for type RealType, eg 6 for float, 15 for double,
+ // expressed as a percentage (so -2) for BOOST_CHECK_CLOSE,
- int decdigits = numeric_limits<RealType>::digits10;
+ int decdigits = numeric_limits<RealType>::digits10;
// May eb >15 for 80 and 128-bit FP typtes.
if (decdigits <= 0)
{ // decdigits is not defined, for example real concept,
@@ -62,21 +62,21 @@
decdigits = 15; // numeric_limits<double>::digits10;
}
- decdigits -= 1; // Perhaps allow some decimal digit(s) margin of numerical error.
- RealType tolerance = static_cast<RealType>(std::pow(10., -(decdigits-2))); // 1e-6 (-2 so as %)
- tolerance *= 2; // Allow some bit(s) small margin (2 means + or - 1 bit) of numerical error.
- // Typically 2e-13% = 2e-15 as fraction for double.
+ decdigits -= 1; // Perhaps allow some decimal digit(s) margin of numerical error.
+ RealType tolerance = static_cast<RealType>(std::pow(10., -(decdigits-2))); // 1e-6 (-2 so as %)
+ tolerance *= 2; // Allow some bit(s) small margin (2 means + or - 1 bit) of numerical error.
+ // Typically 2e-13% = 2e-15 as fraction for double.
- // Sources of spot test values:
+ // Sources of spot test values:
// Many be some combinations for which the result is 'exact',
// or at least is good to 40 decimal digits.
- // 40 decimal digits includes 128-bit significand User Defined Floating-Point types,
-
- // Best source of accurate values is:
- // Mathworld online calculator (40 decimal digits precision, suitable for up to 128-bit significands)
- // http://functions.wolfram.com/webMathematica/FunctionEvaluation.jsp?name=GammaRegularized
- // GammaRegularized is same as gamma incomplete, gamma or gamma_q(a, x) or Q(a, z).
+ // 40 decimal digits includes 128-bit significand User Defined Floating-Point types,
+
+ // Best source of accurate values is:
+ // Mathworld online calculator (40 decimal digits precision, suitable for up to 128-bit significands)
+ // http://functions.wolfram.com/webMathematica/FunctionEvaluation.jsp?name=GammaRegularized
+ // GammaRegularized is same as gamma incomplete, gamma or gamma_q(a, x) or Q(a, z).
// http://documents.wolfram.com/calculationcenter/v2/Functions/ListsMatrices/Statistics/PoissonDistribution.html
@@ -148,177 +148,177 @@
BOOST_CHECK_CLOSE( // mode
mode(poisson_distribution<RealType>(static_cast<RealType>(4))), // mode = mean = 4.
static_cast<RealType>(4), // mode.
- tolerance);
+ tolerance);
//BOOST_CHECK_CLOSE( // mode
// median(poisson_distribution<RealType>(static_cast<RealType>(4))), // mode = mean = 4.
// static_cast<RealType>(4), // mode.
- // tolerance);
+ // tolerance);
poisson_distribution<RealType> dist4(static_cast<RealType>(40));
BOOST_CHECK_CLOSE( // median
median(dist4), // mode = mean = 4. median = 40.328333333333333
quantile(dist4, static_cast<RealType>(0.5)), // 39.332839138842637
- tolerance);
+ tolerance);
// PDF
BOOST_CHECK_CLOSE(
pdf(poisson_distribution<RealType>(static_cast<RealType>(4)), // mean 4.
static_cast<RealType>(0)),
static_cast<RealType>(1.831563888873410E-002), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
pdf(poisson_distribution<RealType>(static_cast<RealType>(4)), // mean 4.
static_cast<RealType>(2)),
static_cast<RealType>(1.465251111098740E-001), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
pdf(poisson_distribution<RealType>(static_cast<RealType>(20)), // mean big.
static_cast<RealType>(1)), // k small
static_cast<RealType>(4.122307244877130E-008), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
pdf(poisson_distribution<RealType>(static_cast<RealType>(4)), // mean 4.
static_cast<RealType>(20)), // K>> mean
static_cast<RealType>(8.277463646553730E-009), // probability.
- tolerance);
+ tolerance);
// CDF
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(0)), // zero k events.
static_cast<RealType>(3.678794411714420E-1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(1)), // one k event.
static_cast<RealType>(7.357588823428830E-1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(2)), // two k events.
static_cast<RealType>(9.196986029286060E-1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(10)), // two k events.
static_cast<RealType>(9.999999899522340E-1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(15)), // two k events.
static_cast<RealType>(9.999999999999810E-1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(16)), // two k events.
static_cast<RealType>(9.999999999999990E-1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(17)), // two k events.
static_cast<RealType>(1.), // probability unity for double.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(33)), // k events at limit for float unchecked_factorial table.
static_cast<RealType>(1.), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(100)), // mean 100.
static_cast<RealType>(33)), // k events at limit for float unchecked_factorial table.
static_cast<RealType>(6.328271240363390E-15), // probability is tiny.
- tolerance * static_cast<RealType>(2e11)); // 6.3495253382825722e-015 MathCAD
+ tolerance * static_cast<RealType>(2e11)); // 6.3495253382825722e-015 MathCAD
// Note that there two tiny probability are much more different.
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(100)), // mean 100.
static_cast<RealType>(34)), // k events at limit for float unchecked_factorial table.
static_cast<RealType>(1.898481372109020E-14), // probability is tiny.
- tolerance*static_cast<RealType>(2e11)); // 1.8984813721090199e-014 MathCAD
+ tolerance*static_cast<RealType>(2e11)); // 1.8984813721090199e-014 MathCAD
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(33)), // mean = k
static_cast<RealType>(33)), // k events above limit for float unchecked_factorial table.
static_cast<RealType>(5.461191812386560E-1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(33)), // mean = k-1
static_cast<RealType>(34)), // k events above limit for float unchecked_factorial table.
static_cast<RealType>(6.133535681502950E-1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1)), // mean unity.
static_cast<RealType>(34)), // k events above limit for float unchecked_factorial table.
static_cast<RealType>(1.), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(5.)), // mean
static_cast<RealType>(5)), // k events.
static_cast<RealType>(0.615960654833065), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(5.)), // mean
static_cast<RealType>(1)), // k events.
static_cast<RealType>(0.040427681994512805), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(5.)), // mean
static_cast<RealType>(0)), // k events (uses special case formula, not gamma).
static_cast<RealType>(0.006737946999085467), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(1.)), // mean
static_cast<RealType>(0)), // k events (uses special case formula, not gamma).
static_cast<RealType>(0.36787944117144233), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(10.)), // mean
static_cast<RealType>(10)), // k events.
static_cast<RealType>(0.5830397501929856), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
cdf(poisson_distribution<RealType>(static_cast<RealType>(4.)), // mean
static_cast<RealType>(5)), // k events.
static_cast<RealType>(0.785130387030406), // probability.
- tolerance);
+ tolerance);
// complement CDF
BOOST_CHECK_CLOSE( // Complement CDF
cdf(complement(poisson_distribution<RealType>(static_cast<RealType>(4.)), // mean
static_cast<RealType>(5))), // k events.
static_cast<RealType>(1 - 0.785130387030406), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE( // Complement CDF
cdf(complement(poisson_distribution<RealType>(static_cast<RealType>(4.)), // mean
static_cast<RealType>(0))), // Zero k events (uses special case formula, not gamma).
static_cast<RealType>(0.98168436111126578), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE( // Complement CDF
cdf(complement(poisson_distribution<RealType>(static_cast<RealType>(1.)), // mean
static_cast<RealType>(0))), // Zero k events (uses special case formula, not gamma).
static_cast<RealType>(0.63212055882855767), // probability.
- tolerance);
+ tolerance);
// Example where k is bigger than max_factorial (>34 for float)
// (therefore using log gamma so perhaps less accurate).
@@ -326,7 +326,7 @@
cdf(poisson_distribution<RealType>(static_cast<RealType>(40.)), // mean
static_cast<RealType>(40)), // k events.
static_cast<RealType>(0.5419181783625430), // probability.
- tolerance);
+ tolerance);
// Quantile & complement.
BOOST_CHECK_CLOSE(
@@ -353,7 +353,7 @@
cdf(poisson_distribution<RealType>(static_cast<RealType>(10.)), // mean
static_cast<RealType>(10)), // k events.
static_cast<RealType>(0.5830397501929856), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(boost::math::quantile( // inverse of cdf above.
poisson_distribution<RealType>(10.), // mean.
@@ -366,7 +366,7 @@
cdf(poisson_distribution<RealType>(static_cast<RealType>(4.)), // mean
static_cast<RealType>(5)), // k events.
static_cast<RealType>(0.785130387030406), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(boost::math::quantile( // inverse of cdf above.
poisson_distribution<RealType>(4.), // mean.
@@ -494,9 +494,9 @@
// Check that can construct normal distribution using the two convenience methods:
using namespace boost::math;
poisson myp1(2); // Using typedef
- poisson_distribution<> myp2(2); // Using default RealType double.
+ poisson_distribution<> myp2(2); // Using default RealType double.
- // Basic sanity-check spot values.
+ // Basic sanity-check spot values.
// Some plain double examples & tests:
cout.precision(17); // double max_digits10
@@ -523,12 +523,12 @@
BOOST_CHECK_CLOSE(
pdf(mypoisson, 2.), // k events = 2.
1.465251111098740E-001, // probability.
- 5e-13);
+ 5e-13);
BOOST_CHECK_CLOSE(
cdf(mypoisson, 2.), // k events = 2.
0.238103305553545, // probability.
- 5e-13);
+ 5e-13);
#if 0
@@ -562,7 +562,7 @@
BOOST_CHECK_CLOSE(
cdf(mypoisson, static_cast<double>(i)),
sum, // of pdfs.
- 4e-14); // Fails at 2e-14
+ 4e-14); // Fails at 2e-14
// This call puts the precision etc back to default 6 !!!
cout << setprecision(17) << showpoint;
@@ -584,7 +584,7 @@
}
#endif
- // (Parameter value, arbitrarily zero, only communicates the floating-point type).
+ // (Parameter value, arbitrarily zero, only communicates the floating-point type).
#ifdef TEST_POISSON
test_spots(0.0F); // Test float.
#endif
@@ -595,7 +595,7 @@
if (numeric_limits<long double>::digits10 > numeric_limits<double>::digits10)
{ // long double is better than double (so not MSVC where they are same).
#ifdef TEST_LDOUBLE
- test_spots(0.0L); // Test long double.
+ test_spots(0.0L); // Test long double.
#endif
}
@@ -605,7 +605,7 @@
#endif
#endif
#endif
- return 0;
+ return 0;
} // int test_main(int, char* [])
/*
Modified: trunk/libs/math/test/test_policy.cpp
==============================================================================
--- trunk/libs/math/test/test_policy.cpp (original)
+++ trunk/libs/math/test/test_policy.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -35,7 +35,7 @@
BOOST_CHECK((is_same<policy<>::domain_error_type, domain_error<BOOST_MATH_DOMAIN_ERROR_POLICY> >::value));
BOOST_CHECK((is_same<policy<>::evaluation_error_type, evaluation_error<BOOST_MATH_EVALUATION_ERROR_POLICY> >::value));
-
+
BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::domain_error_type, domain_error<ignore_error> >::value));
BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::pole_error_type, pole_error<BOOST_MATH_POLE_ERROR_POLICY> >::value));
BOOST_CHECK((is_same<policy<domain_error<ignore_error> >::overflow_error_type, overflow_error<BOOST_MATH_OVERFLOW_ERROR_POLICY> >::value));
Modified: trunk/libs/math/test/test_rational_instances/test_rational.hpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational.hpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational.hpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#ifndef BOOST_MATH_TEST_RATIONAL_HPP
#define BOOST_MATH_TEST_RATIONAL_HPP
Modified: trunk/libs/math/test/test_rational_instances/test_rational_double1.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_double1.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_double1.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_double2.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_double2.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_double2.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_double3.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_double3.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_double3.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_double4.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_double4.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_double4.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,7 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_double5.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_double5.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_double5.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_float1.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_float1.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_float1.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_float2.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_float2.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_float2.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_float3.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_float3.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_float3.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_float4.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_float4.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_float4.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_ldouble1.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_ldouble1.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_ldouble1.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_ldouble2.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_ldouble2.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_ldouble2.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_ldouble3.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_ldouble3.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_ldouble3.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_ldouble4.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_ldouble4.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_ldouble4.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_ldouble5.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_ldouble5.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_ldouble5.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include "test_rational.hpp"
Modified: trunk/libs/math/test/test_rational_instances/test_rational_real_concept1.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_real_concept1.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_real_concept1.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/detail/workaround.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
Modified: trunk/libs/math/test/test_rational_instances/test_rational_real_concept2.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_real_concept2.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_real_concept2.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/detail/workaround.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
Modified: trunk/libs/math/test/test_rational_instances/test_rational_real_concept3.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_real_concept3.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_real_concept3.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/detail/workaround.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
Modified: trunk/libs/math/test/test_rational_instances/test_rational_real_concept4.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_real_concept4.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_real_concept4.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/detail/workaround.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
Modified: trunk/libs/math/test/test_rational_instances/test_rational_real_concept5.cpp
==============================================================================
--- trunk/libs/math/test/test_rational_instances/test_rational_real_concept5.cpp (original)
+++ trunk/libs/math/test/test_rational_instances/test_rational_real_concept5.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/detail/workaround.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
Modified: trunk/libs/math/test/test_rayleigh.cpp
==============================================================================
--- trunk/libs/math/test/test_rayleigh.cpp (original)
+++ trunk/libs/math/test/test_rayleigh.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -14,15 +14,15 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/rayleigh.hpp>
- using boost::math::rayleigh_distribution;
+ using boost::math::rayleigh_distribution;
#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
template <class RealType>
void test_spot(RealType s, RealType x, RealType p, RealType q, RealType tolerance)
@@ -32,13 +32,13 @@
rayleigh_distribution<RealType>(s),
x),
p,
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(rayleigh_distribution<RealType>(s),
x)),
q,
- tolerance); // %
+ tolerance); // %
// Special extra tests for p and q near to unity.
if(p < 0.999)
{
@@ -47,7 +47,7 @@
rayleigh_distribution<RealType>(s),
p),
x,
- tolerance); // %
+ tolerance); // %
}
if(q < 0.999)
{
@@ -56,7 +56,7 @@
complement(rayleigh_distribution<RealType>(s),
q)),
x,
- tolerance); // %
+ tolerance); // %
}
} // void test_spot
@@ -72,7 +72,7 @@
static_cast<RealType>(boost::math::tools::epsilon<double>()),
boost::math::tools::epsilon<RealType>());
tolerance *= 10 * 100; // 10 eps as a percent
- cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(T).name() << " is " << tolerance << " %" << endl;
using namespace boost::math::constants;
@@ -134,72 +134,72 @@
rayleigh_distribution<RealType>(1.L),
static_cast<RealType>(1.L)), // x
static_cast<RealType>(exp_minus_half<RealType>()), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
rayleigh_distribution<RealType>(0.5L),
static_cast<RealType>(0.5L)), // x
static_cast<RealType>(2 * exp_minus_half<RealType>()), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::pdf(
rayleigh_distribution<RealType>(2.L),
static_cast<RealType>(2.L)), // x
static_cast<RealType>(exp_minus_half<RealType>() /2), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::mean(
rayleigh_distribution<RealType>(1.L)),
static_cast<RealType>(root_half_pi<RealType>()),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::variance(
rayleigh_distribution<RealType>(root_two<RealType>())),
static_cast<RealType>(four_minus_pi<RealType>()),
- tolerance * 100); // %
+ tolerance * 100); // %
BOOST_CHECK_CLOSE(
::boost::math::mode(
rayleigh_distribution<RealType>(1.L)),
static_cast<RealType>(1.L),
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::median(
rayleigh_distribution<RealType>(1.L)),
static_cast<RealType>(sqrt(log(4.L))), // sigma * sqrt(log_four)
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::skewness(
rayleigh_distribution<RealType>(1.L)),
static_cast<RealType>(2.L * root_pi<RealType>()) * (pi<RealType>() - 3) / (pow((4 - pi<RealType>()), static_cast<RealType>(1.5L))),
- tolerance * 100); // %
+ tolerance * 100); // %
BOOST_CHECK_CLOSE(
::boost::math::skewness(
rayleigh_distribution<RealType>(1.L)),
static_cast<RealType>(0.63111065781893713819189935154422777984404221106391L),
- tolerance * 100); // %
+ tolerance * 100); // %
BOOST_CHECK_CLOSE(
::boost::math::kurtosis_excess(
rayleigh_distribution<RealType>(1.L)),
static_cast<RealType>(0.2450893006876380628486604106197544154170667057995L),
- tolerance * 1000); // %
+ tolerance * 1000); // %
BOOST_CHECK_CLOSE(
::boost::math::kurtosis(
rayleigh_distribution<RealType>(1.L)),
static_cast<RealType>(3.2450893006876380628486604106197544154170667057995L),
- tolerance * 100); // %
+ tolerance * 100); // %
BOOST_CHECK_CLOSE(
::boost::math::kurtosis_excess(rayleigh_distribution<RealType>(2)),
::boost::math::kurtosis(rayleigh_distribution<RealType>(2)) -3,
- tolerance* 100); // %
+ tolerance* 100); // %
return;
} // template <class RealType>void test_spots(RealType)
@@ -207,11 +207,11 @@
int test_main(int, char* [])
{
// Check that can generate rayleigh distribution using the two convenience methods:
- boost::math::rayleigh ray1(1.); // Using typedef
- rayleigh_distribution<> ray2(1.); // Using default RealType double.
+ boost::math::rayleigh ray1(1.); // Using typedef
+ rayleigh_distribution<> ray2(1.); // Using default RealType double.
using namespace boost::math::constants;
- // Basic sanity-check spot values.
+ // Basic sanity-check spot values.
// Double only tests.
BOOST_CHECK_CLOSE_FRACTION(
@@ -219,72 +219,72 @@
rayleigh_distribution<double>(1.),
static_cast<double>(1)), // x
static_cast<double>(exp_minus_half<double>()), // p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::pdf(
rayleigh_distribution<double>(0.5),
static_cast<double>(0.5)), // x
static_cast<double>(2 * exp_minus_half<double>()), // p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::pdf(
rayleigh_distribution<double>(2.),
static_cast<double>(2)), // x
static_cast<double>(exp_minus_half<double>() /2 ), // p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::cdf(
rayleigh_distribution<double>(1.),
static_cast<double>(1)), // x
static_cast<double>(1- exp_minus_half<double>()), // p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::cdf(
rayleigh_distribution<double>(2.),
static_cast<double>(2)), // x
static_cast<double>(1- exp_minus_half<double>()), // p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::cdf(
rayleigh_distribution<double>(3.),
static_cast<double>(3)), // x
static_cast<double>(1- exp_minus_half<double>()), // p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::cdf(
rayleigh_distribution<double>(4.),
static_cast<double>(4)), // x
static_cast<double>(1- exp_minus_half<double>()), // p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::cdf(complement(
rayleigh_distribution<double>(4.),
static_cast<double>(4))), // x
static_cast<double>(exp_minus_half<double>()), // q = 1 - p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::quantile(
rayleigh_distribution<double>(4.),
static_cast<double>(1- exp_minus_half<double>())), // x
static_cast<double>(4), // p
- 1e-15); // %
+ 1e-15); // %
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::quantile(complement(
rayleigh_distribution<double>(4.),
static_cast<double>(exp_minus_half<double>()))), // x
static_cast<double>(4), // p
- 1e-15); // %
+ 1e-15); // %
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_students_t.cpp
==============================================================================
--- trunk/libs/math/test/test_students_t.cpp (original)
+++ trunk/libs/math/test/test_students_t.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -18,14 +18,14 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/students_t.hpp>
- using boost::math::students_t_distribution;
+ using boost::math::students_t_distribution;
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/tools/test.hpp> // for real_concept
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
#include <limits>
using std::numeric_limits;
@@ -54,29 +54,29 @@
void test_spots(RealType)
{
// Basic sanity checks
- RealType tolerance = static_cast<RealType>(std::pow(10., -(6-2))); // 1e-6 (as %)
- // Some tests only pass at 1e-5 because probability value is less accurate,
- // a digit in 6th decimal place, although calculated using
- // a t-distribution generator (claimed 6 decimal digits) at
+ RealType tolerance = static_cast<RealType>(std::pow(10., -(6-2))); // 1e-6 (as %)
+ // Some tests only pass at 1e-5 because probability value is less accurate,
+ // a digit in 6th decimal place, although calculated using
+ // a t-distribution generator (claimed 6 decimal digits) at
// http://faculty.vassar.edu/lowry/VassarStats.html
- // http://faculty.vassar.edu/lowry/tsamp.html
- // df = 5, +/-t = 2.0, 1-tailed = 0.050970, 2-tailed = 0.101939
+ // http://faculty.vassar.edu/lowry/tsamp.html
+ // df = 5, +/-t = 2.0, 1-tailed = 0.050970, 2-tailed = 0.101939
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
- // http://en.wikipedia.org/wiki/Student%27s_t_distribution#Table_of_selected_values
+ // http://en.wikipedia.org/wiki/Student%27s_t_distribution#Table_of_selected_values
// Using tabulated value of t = 3.182 for 0.975, 3 df, one-sided.
- // http://www.mth.kcl.ac.uk/~shaww/web_page/papers/Tdistribution06.pdf refers to:
+ // http://www.mth.kcl.ac.uk/~shaww/web_page/papers/Tdistribution06.pdf refers to:
- // A lookup table of quantiles of the RealType distribution
+ // A lookup table of quantiles of the RealType distribution
// for 1 to 25 in steps of 0.1 is provided in CSV form at:
// www.mth.kcl.ac.uk/~shaww/web_page/papers/Tsupp/tquantiles.csv
- // gives accurate t of -3.1824463052837 and 3 degrees of freedom.
- // Values below are from this source, saved as tquantiles.xls.
- // DF are across the columns, probabilities down the rows
- // and the t- values (quantiles) are shown.
- // These values are probably accurate to nearly 64-bit double
+ // gives accurate t of -3.1824463052837 and 3 degrees of freedom.
+ // Values below are from this source, saved as tquantiles.xls.
+ // DF are across the columns, probabilities down the rows
+ // and the t- values (quantiles) are shown.
+ // These values are probably accurate to nearly 64-bit double
// (perhaps 14 decimal digits).
BOOST_CHECK_CLOSE(
@@ -84,63 +84,63 @@
students_t_distribution<RealType>(2), // degrees_of_freedom
static_cast<RealType>(-6.96455673428326)), // t
static_cast<RealType>(0.01), // probability.
- tolerance); // %
+ tolerance); // %
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(5), // degrees_of_freedom
static_cast<RealType>(-3.36492999890721)), // t
static_cast<RealType>(0.01), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(1), // degrees_of_freedom
static_cast<RealType>(-31830.988607907)), // t
static_cast<RealType>(0.00001), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(25.), // degrees_of_freedom
static_cast<RealType>(-5.2410429995425)), // t
static_cast<RealType>(0.00001), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(1), // degrees_of_freedom
static_cast<RealType>(-63661.97723)), // t
static_cast<RealType>(0.000005), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(5.), // degrees_of_freedom
static_cast<RealType>(-17.89686614)), // t
static_cast<RealType>(0.000005), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(25.), // degrees_of_freedom
static_cast<RealType>(-5.510848412)), // t
static_cast<RealType>(0.000005), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(10.), // degrees_of_freedom
static_cast<RealType>(-1.812461123)), // t
static_cast<RealType>(0.05), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(10), // degrees_of_freedom
static_cast<RealType>(1.812461123)), // t
static_cast<RealType>(0.95), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
@@ -148,24 +148,24 @@
students_t_distribution<RealType>(10), // degrees_of_freedom
static_cast<RealType>(1.812461123))), // t
static_cast<RealType>(0.05), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(10), // degrees_of_freedom
static_cast<RealType>(9.751995491)), // t
static_cast<RealType>(0.999999), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(10.), // degrees_of_freedom - for ALL degrees_of_freedom!
static_cast<RealType>(0.)), // t
static_cast<RealType>(0.5), // probability.
- tolerance);
+ tolerance);
- // Student's t Inverse function tests.
+ // Student's t Inverse function tests.
// Special cases
BOOST_CHECK_THROW(boost::math::quantile(
@@ -191,20 +191,20 @@
students_t_distribution<RealType>(1.), // degrees_of_freedom (ignored).
static_cast<RealType>(0.5)), // probability == half - special case.
static_cast<RealType>(0), // t == zero.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE( // Tests of p middling.
::boost::math::cdf(
students_t_distribution<RealType>(5.), // degrees_of_freedom
static_cast<RealType>(-0.559429644)), // t
static_cast<RealType>(0.3), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::quantile(
students_t_distribution<RealType>(5.), // degrees_of_freedom
static_cast<RealType>(0.3)), // probability.
static_cast<RealType>(-0.559429644), // t
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::quantile(
@@ -212,47 +212,47 @@
students_t_distribution<RealType>(5.), // degrees_of_freedom
static_cast<RealType>(0.7))), // probability.
static_cast<RealType>(-0.559429644), // t
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE( // Tests of p high.
::boost::math::cdf(
students_t_distribution<RealType>(5.), // degrees_of_freedom
static_cast<RealType>(1.475884049)), // t
static_cast<RealType>(0.9), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::quantile(
students_t_distribution<RealType>(5.), // degrees_of_freedom
static_cast<RealType>(0.9)), // probability.
static_cast<RealType>(1.475884049), // t
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE( // Tests of p low.
::boost::math::cdf(
students_t_distribution<RealType>(5.), // degrees_of_freedom
static_cast<RealType>(-1.475884049)), // t
static_cast<RealType>(0.1), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::quantile(
students_t_distribution<RealType>(5.), // degrees_of_freedom
static_cast<RealType>(0.1)), // probability.
static_cast<RealType>(-1.475884049), // t
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::cdf(
students_t_distribution<RealType>(2.), // degrees_of_freedom
static_cast<RealType>(-6.96455673428326)), // t
static_cast<RealType>(0.01), // probability.
- tolerance);
+ tolerance);
BOOST_CHECK_CLOSE(
::boost::math::quantile(
students_t_distribution<RealType>(2.), // degrees_of_freedom
static_cast<RealType>(0.01)), // probability.
static_cast<RealType>(-6.96455673428326), // t
- tolerance);
+ tolerance);
// Student's t pdf tests.
@@ -379,11 +379,11 @@
// Check that can construct students_t distribution using the two convenience methods:
using namespace boost::math;
students_t myst1(2); // Using typedef
- students_t_distribution<> myst2(2); // Using default RealType double.
- //students_t_distribution<double> myst3(2); // Using explicit RealType double.
+ students_t_distribution<> myst2(2); // Using default RealType double.
+ //students_t_distribution<double> myst3(2); // Using explicit RealType double.
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_tgamma_ratio.cpp
==============================================================================
--- trunk/libs/math/test/test_tgamma_ratio.cpp (original)
+++ trunk/libs/math/test/test_tgamma_ratio.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -70,7 +70,23 @@
"float", // test type(s)
"[^|]*", // test data group
"boost::math::tgamma_ratio[^|]*", 35, 8); // test function
-
+ //
+ // Linux AMD x86em64 has slightly higher rates:
+ //
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "linux.*", // platform
+ largest_type, // test type(s)
+ "[^|]*", // test data group
+ "boost::math::tgamma_ratio[^|]*", 300, 100); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "linux.*", // platform
+ "real_concept", // test type(s)
+ "[^|]*", // test data group
+ "boost::math::tgamma_ratio[^|]*", 300, 100); // test function
//
// Catch all cases come last:
//
Modified: trunk/libs/math/test/test_uniform.cpp
==============================================================================
--- trunk/libs/math/test/test_uniform.cpp (original)
+++ trunk/libs/math/test/test_uniform.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -18,13 +18,13 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/uniform.hpp>
- using boost::math::uniform_distribution;
+ using boost::math::uniform_distribution;
#include <boost/math/tools/test.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
#include <limits>
using std::numeric_limits;
@@ -36,27 +36,27 @@
uniform_distribution<RealType>(lower, upper), // distribution.
x), // random variable.
p, // probability.
- tol); // tolerance.
+ tol); // tolerance.
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::cdf(
complement(
uniform_distribution<RealType>(lower, upper), // distribution.
x)), // random variable.
q, // probability complement.
- tol); // tolerance.
+ tol); // tolerance.
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::quantile(
uniform_distribution<RealType>(lower, upper), // distribution.
p), // probability.
x, // random variable.
- tol); // tolerance.
+ tol); // tolerance.
BOOST_CHECK_CLOSE_FRACTION(
::boost::math::quantile(
complement(
uniform_distribution<RealType>(lower, upper), // distribution.
q)), // probability complement.
x, // random variable.
- tol); // tolerance.
+ tol); // tolerance.
} // void check_uniform
template <class RealType>
@@ -70,8 +70,8 @@
//
// Tolerance is just over 5 decimal digits expressed as a fraction:
// that's the limit of the test data.
- RealType tolerance = 2e-5f;
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << "." << endl;
+ RealType tolerance = 2e-5f;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << "." << endl;
using std::exp;
@@ -283,7 +283,7 @@
tolerance = (std::max)(
boost::math::tools::epsilon<RealType>(),
static_cast<RealType>(boost::math::tools::epsilon<double>())) * 5; // 5 eps as a fraction.
- cout << "Tolerance (as fraction) for type " << typeid(RealType).name() << " is " << tolerance << "." << endl;
+ cout << "Tolerance (as fraction) for type " << typeid(RealType).name() << " is " << tolerance << "." << endl;
uniform_distribution<RealType> distu01(0, 1);
RealType x = static_cast<RealType>(0.5);
using namespace std; // ADL of std names.
@@ -375,7 +375,7 @@
// == uniform_distribution<double> unistd;
BOOST_CHECK_EQUAL(unistd.lower(), 0); // Check defaults.
BOOST_CHECK_EQUAL(unistd.upper(), 1);
- uniform_distribution<> myu01(0, 1); // Using default RealType double.
+ uniform_distribution<> myu01(0, 1); // Using default RealType double.
BOOST_CHECK_EQUAL(myu01.lower(), 0); // Check defaults again.
BOOST_CHECK_EQUAL(myu01.upper(), 1);
@@ -393,7 +393,7 @@
BOOST_CHECK_THROW(uniform_distribution<> zinf(0, +std::numeric_limits<double>::infinity()), std::domain_error); // zero to infinity using default RealType double.
- uniform_distribution<> zmax(0, +(std::numeric_limits<double>::max)()); // zero to max using default RealType double.
+ uniform_distribution<> zmax(0, +(std::numeric_limits<double>::max)()); // zero to max using default RealType double.
BOOST_CHECK_EQUAL(zmax.lower(), 0); // Check defaults again.
BOOST_CHECK_EQUAL(zmax.upper(), +(std::numeric_limits<double>::max)());
@@ -409,8 +409,8 @@
BOOST_CHECK_THROW(uniform_distribution<> zNaN(0, std::numeric_limits<double>::quiet_NaN()), std::domain_error);
BOOST_CHECK_THROW(pdf(unistd, std::numeric_limits<double>::quiet_NaN()), std::domain_error);
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/test_weibull.cpp
==============================================================================
--- trunk/libs/math/test/test_weibull.cpp (original)
+++ trunk/libs/math/test/test_weibull.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -13,13 +13,13 @@
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/weibull.hpp>
- using boost::math::weibull_distribution;
+ using boost::math::weibull_distribution;
#include <boost/math/tools/test.hpp>
#include <iostream>
- using std::cout;
- using std::endl;
- using std::setprecision;
+ using std::cout;
+ using std::endl;
+ using std::setprecision;
#include <limits>
using std::numeric_limits;
@@ -31,27 +31,27 @@
weibull_distribution<RealType>(shape, scale), // distribution.
x), // random variable.
p, // probability.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::cdf(
complement(
weibull_distribution<RealType>(shape, scale), // distribution.
x)), // random variable.
q, // probability complement.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::quantile(
weibull_distribution<RealType>(shape, scale), // distribution.
p), // probability.
x, // random variable.
- tol); // %tolerance.
+ tol); // %tolerance.
BOOST_CHECK_CLOSE(
::boost::math::quantile(
complement(
weibull_distribution<RealType>(shape, scale), // distribution.
q)), // probability complement.
x, // random variable.
- tol); // %tolerance.
+ tol); // %tolerance.
}
template <class RealType>
@@ -65,8 +65,8 @@
//
// Tolerance is just over 5 decimal digits expressed as a persentage:
// that's the limit of the test data.
- RealType tolerance = 2e-5f * 100;
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ RealType tolerance = 2e-5f * 100;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
using std::exp;
@@ -251,7 +251,7 @@
tolerance = (std::max)(
boost::math::tools::epsilon<RealType>(),
static_cast<RealType>(boost::math::tools::epsilon<double>())) * 5 * 100; // 5 eps as a percentage
- cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << " %" << endl;
weibull_distribution<RealType> dist(2, 3);
RealType x = static_cast<RealType>(0.125);
using namespace std; // ADL of std names.
@@ -334,10 +334,10 @@
// Check that can construct weibull distribution using the two convenience methods:
using namespace boost::math;
weibull myw1(2); // Using typedef
- weibull_distribution<> myw2(2); // Using default RealType double.
+ weibull_distribution<> myw2(2); // Using default RealType double.
- // Basic sanity-check spot values.
- // (Parameter value, arbitrarily zero, only communicates the floating point type).
+ // Basic sanity-check spot values.
+ // (Parameter value, arbitrarily zero, only communicates the floating point type).
test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 %
test_spots(0.0); // Test double. OK at decdigits 7, tolerance = 1e07 %
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
Modified: trunk/libs/math/test/tgamma_delta_ratio_data.ipp
==============================================================================
--- trunk/libs/math/test/tgamma_delta_ratio_data.ipp (original)
+++ trunk/libs/math/test/tgamma_delta_ratio_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 560> tgamma_delta_ratio_data = { {
{ SC_(0.2585242462158203125e2), SC_(0.5408298164866209845058619976043701171875e-7), SC_(0.9999998251530248995276873521622051469349e0), SC_(0.1000000174847005556584935896873247717521e1) },
Modified: trunk/libs/math/test/tgamma_delta_ratio_int.ipp
==============================================================================
--- trunk/libs/math/test/tgamma_delta_ratio_int.ipp (original)
+++ trunk/libs/math/test/tgamma_delta_ratio_int.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 344> tgamma_delta_ratio_int = { {
{ SC_(0.24302618503570556640625e1), SC_(0.1e1), SC_(0.4114782939349022594054088894256271572472e0), SC_(0.14302618503570556640625e1) },
Modified: trunk/libs/math/test/tgamma_delta_ratio_int2.ipp
==============================================================================
--- trunk/libs/math/test/tgamma_delta_ratio_int2.ipp (original)
+++ trunk/libs/math/test/tgamma_delta_ratio_int2.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 4>, 190> tgamma_delta_ratio_int2 = { {
{ SC_(0.11e2), SC_(0.1e2), SC_(0.1491552059147518383844493235618106619139e-11), SC_(0.36288e7) },
Modified: trunk/libs/math/test/tgamma_ratio_data.ipp
==============================================================================
--- trunk/libs/math/test/tgamma_ratio_data.ipp (original)
+++ trunk/libs/math/test/tgamma_ratio_data.ipp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2006-7.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#define SC_(x) static_cast<T>(BOOST_JOIN(x, L))
static const boost::array<boost::array<T, 3>, 400> tgamma_ratio_data = { {
{ SC_(6.68193912506103515625), SC_(6.68193912506103515625), SC_(1) },
Modified: trunk/libs/math/tools/ellint_e_data.cpp
==============================================================================
--- trunk/libs/math/tools/ellint_e_data.cpp (original)
+++ trunk/libs/math/tools/ellint_e_data.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/math/bindings/rr.hpp>
#include <boost/math/tools/test_data.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: trunk/libs/math/tools/ellint_f_data.cpp
==============================================================================
--- trunk/libs/math/tools/ellint_f_data.cpp (original)
+++ trunk/libs/math/tools/ellint_f_data.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/math/bindings/rr.hpp>
#include <boost/math/tools/test_data.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: trunk/libs/math/tools/ellint_k_data.cpp
==============================================================================
--- trunk/libs/math/tools/ellint_k_data.cpp (original)
+++ trunk/libs/math/tools/ellint_k_data.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,8 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
#include <boost/math/bindings/rr.hpp>
#include <boost/math/tools/test_data.hpp>
#include <boost/test/included/test_exec_monitor.hpp>
Modified: trunk/libs/math/tools/factorial_tables.cpp
==============================================================================
--- trunk/libs/math/tools/factorial_tables.cpp (original)
+++ trunk/libs/math/tools/factorial_tables.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,7 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/bindings/rr.hpp>
#include <boost/limits.hpp>
Modified: trunk/libs/math/tools/generate_rational_test.cpp
==============================================================================
--- trunk/libs/math/tools/generate_rational_test.cpp (original)
+++ trunk/libs/math/tools/generate_rational_test.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,7 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define BOOST_MATH_POLY_METHOD 0
#define BOOST_MATH_RATIONAL_METHOD 0
Modified: trunk/libs/math/tools/hermite_data.cpp
==============================================================================
--- trunk/libs/math/tools/hermite_data.cpp (original)
+++ trunk/libs/math/tools/hermite_data.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,7 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/bindings/rr.hpp>
#include <boost/math/tools/test_data.hpp>
Modified: trunk/libs/math/tools/laguerre_data.cpp
==============================================================================
--- trunk/libs/math/tools/laguerre_data.cpp (original)
+++ trunk/libs/math/tools/laguerre_data.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,7 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/bindings/rr.hpp>
#include <boost/math/tools/test_data.hpp>
Modified: trunk/libs/math/tools/legendre_data.cpp
==============================================================================
--- trunk/libs/math/tools/legendre_data.cpp (original)
+++ trunk/libs/math/tools/legendre_data.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,7 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/bindings/rr.hpp>
#include <boost/math/tools/test_data.hpp>
Modified: trunk/libs/math/tools/rational_tests.cpp
==============================================================================
--- trunk/libs/math/tools/rational_tests.cpp (original)
+++ trunk/libs/math/tools/rational_tests.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,7 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/bindings/rr.hpp>
#include <boost/tr1/random.hpp>
Modified: trunk/libs/math/tools/spherical_harmonic_data.cpp
==============================================================================
--- trunk/libs/math/tools/spherical_harmonic_data.cpp (original)
+++ trunk/libs/math/tools/spherical_harmonic_data.cpp 2007-10-16 05:32:28 EDT (Tue, 16 Oct 2007)
@@ -1,3 +1,7 @@
+// (C) Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/bindings/rr.hpp>
#include <boost/math/tools/test_data.hpp>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk