|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56667 - in sandbox/math_toolkit: boost/math boost/math/distributions boost/math/distributions/detail boost/math/policies boost/math/special_functions boost/math/special_functions/detail boost/math/tools libs/math libs/math/build libs/math/config libs/math/doc/sf_and_dist libs/math/doc/sf_and_dist/distributions libs/math/doc/sf_and_dist/graphs libs/math/example libs/math/minimax libs/math/performance libs/math/test
From: john_at_[hidden]
Date: 2009-10-09 08:38:44
Author: johnmaddock
Date: 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
New Revision: 56667
URL: http://svn.boost.org/trac/boost/changeset/56667
Log:
Merged changes from Trunk.
Added:
sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/c_sharp.qbk
- copied unchanged from r56665, /trunk/libs/math/doc/sf_and_dist/distributions/c_sharp.qbk
sandbox/math_toolkit/libs/math/doc/sf_and_dist/sign.qbk
- copied unchanged from r56665, /trunk/libs/math/doc/sf_and_dist/sign.qbk
sandbox/math_toolkit/libs/math/performance/test_beta.cpp
- copied unchanged from r56665, /trunk/libs/math/performance/test_beta.cpp
sandbox/math_toolkit/libs/math/performance/test_expm1_log1p.cpp
- copied unchanged from r56665, /trunk/libs/math/performance/test_expm1_log1p.cpp
sandbox/math_toolkit/libs/math/test/test_policy_8.cpp
- copied unchanged from r56665, /trunk/libs/math/test/test_policy_8.cpp
sandbox/math_toolkit/libs/math/test/test_sign.cpp
- copied unchanged from r56665, /trunk/libs/math/test/test_sign.cpp
Properties modified:
sandbox/math_toolkit/boost/math/ (props changed)
sandbox/math_toolkit/boost/math/distributions/logistic.hpp (props changed)
sandbox/math_toolkit/libs/math/ (props changed)
sandbox/math_toolkit/libs/math/config/Jamfile.v2 (props changed)
sandbox/math_toolkit/libs/math/config/has_long_double_support.cpp (props changed)
sandbox/math_toolkit/libs/math/config/has_mpfr_class.cpp (props changed)
sandbox/math_toolkit/libs/math/config/has_ntl_rr.cpp (props changed)
sandbox/math_toolkit/libs/math/test/test_logistic_dist.cpp (contents, props changed)
Binary files modified:
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/acosh.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/acosh.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/asinh.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/asinh.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/atanh.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/atanh.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/beta.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/beta.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/beta_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/beta_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cauchy_pdf1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cauchy_pdf1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cauchy_pdf2.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cauchy_pdf2.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cbrt.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cbrt.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/chi_squared_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/chi_squared_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_i.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_i.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_j.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_j.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_k.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_k.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_neumann.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_neumann.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/digamma.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/digamma.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_2.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_2.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_3.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_3.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_carlson.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_carlson.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erf_inv.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erf_inv.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erfc.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erfc.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erfc_inv.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erfc_inv.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expint2.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expint2.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expint_i.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expint_i.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expm1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expm1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/exponential_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/exponential_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/extreme_value_pdf1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/extreme_value_pdf1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/extreme_value_pdf2.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/extreme_value_pdf2.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/fisher_f_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/fisher_f_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma1_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma1_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma2_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma2_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma_p.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma_p.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma_q.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma_q.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/hermite.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/hermite.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ibeta.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ibeta.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/laguerre.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lgamma.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lgamma.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/log1p.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/log1p.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lognormal_pdf1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lognormal_pdf1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lognormal_pdf2.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lognormal_pdf2.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_beta_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_beta_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_f_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_f_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_t_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_t_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nccs_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nccs_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/normal_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/normal_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/pareto_pdf1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/pareto_pdf1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/pareto_pdf2.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/pareto_pdf2.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/powm1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/powm1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/rayleigh_cdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/rayleigh_cdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/rayleigh_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/rayleigh_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sinc_pi.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sinc_pi.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sinhc_pi.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sinhc_pi.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sph_bessel.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sph_bessel.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sph_neumann.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sph_neumann.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sqrt1pm1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sqrt1pm1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/students_t_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/students_t_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/tgamma.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/tgamma.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/tgamma_delta_ratio.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/tgamma_delta_ratio.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/triangular_cdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/triangular_cdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/triangular_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/triangular_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/uniform_cdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/uniform_cdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/uniform_pdf.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/uniform_pdf.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/weibull_pdf1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/weibull_pdf1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/weibull_pdf2.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/weibull_pdf2.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/zeta1.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/zeta1.svg
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/zeta2.png
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/zeta2.svg
Text files modified:
sandbox/math_toolkit/boost/math/distributions/detail/hypergeometric_pdf.hpp | 35 ++++
sandbox/math_toolkit/boost/math/distributions/detail/hypergeometric_quantile.hpp | 44 +++++
sandbox/math_toolkit/boost/math/distributions/non_central_beta.hpp | 6
sandbox/math_toolkit/boost/math/distributions/non_central_chi_squared.hpp | 8
sandbox/math_toolkit/boost/math/distributions/non_central_t.hpp | 6
sandbox/math_toolkit/boost/math/policies/error_handling.hpp | 9 +
sandbox/math_toolkit/boost/math/policies/policy.hpp | 78 +++++++++
sandbox/math_toolkit/boost/math/special_functions/bessel.hpp | 12 +
sandbox/math_toolkit/boost/math/special_functions/beta.hpp | 24 +-
sandbox/math_toolkit/boost/math/special_functions/binomial.hpp | 1
sandbox/math_toolkit/boost/math/special_functions/cbrt.hpp | 7
sandbox/math_toolkit/boost/math/special_functions/detail/erf_inv.hpp | 6
sandbox/math_toolkit/boost/math/special_functions/detail/fp_traits.hpp | 4
sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp | 4
sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp | 80 ++++++++--
sandbox/math_toolkit/boost/math/special_functions/detail/lanczos_sse2.hpp | 2
sandbox/math_toolkit/boost/math/special_functions/erf.hpp | 18 +
sandbox/math_toolkit/boost/math/special_functions/expint.hpp | 6
sandbox/math_toolkit/boost/math/special_functions/expm1.hpp | 10
sandbox/math_toolkit/boost/math/special_functions/factorials.hpp | 4
sandbox/math_toolkit/boost/math/special_functions/gamma.hpp | 241 +++++++++++++++++++------------
sandbox/math_toolkit/boost/math/special_functions/log1p.hpp | 12
sandbox/math_toolkit/boost/math/special_functions/sign.hpp | 61 +++++++
sandbox/math_toolkit/boost/math/special_functions/zeta.hpp | 2
sandbox/math_toolkit/boost/math/tools/config.hpp | 14 +
sandbox/math_toolkit/boost/math/tools/fraction.hpp | 116 ++++++--------
sandbox/math_toolkit/boost/math/tools/roots.hpp | 2
sandbox/math_toolkit/boost/math/tools/series.hpp | 92 ++++-------
sandbox/math_toolkit/libs/math/CMakeLists.txt | 6
sandbox/math_toolkit/libs/math/build/Jamfile.v2 | 1
sandbox/math_toolkit/libs/math/doc/sf_and_dist/building.qbk | 2
sandbox/math_toolkit/libs/math/doc/sf_and_dist/concepts.qbk | 6
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp | 29 +-
sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp | 5
sandbox/math_toolkit/libs/math/doc/sf_and_dist/ibeta.qbk | 2
sandbox/math_toolkit/libs/math/doc/sf_and_dist/igamma.qbk | 10
sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk | 18 +
sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk | 8
sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1.qbk | 4
sandbox/math_toolkit/libs/math/example/error_policies_example.cpp | 2
sandbox/math_toolkit/libs/math/example/neg_binom_confidence_limits.cpp | 3
sandbox/math_toolkit/libs/math/example/policy_eg_1.cpp | 3
sandbox/math_toolkit/libs/math/minimax/f.cpp | 4
sandbox/math_toolkit/libs/math/minimax/main.cpp | 6
sandbox/math_toolkit/libs/math/performance/distributions.cpp | 287 ++++++++++++++++++++++++++++++++++++++
sandbox/math_toolkit/libs/math/performance/test_erf.cpp | 27 +++
sandbox/math_toolkit/libs/math/performance/test_gamma.cpp | 66 ++++++++
sandbox/math_toolkit/libs/math/performance/test_ibeta.cpp | 37 ++++
sandbox/math_toolkit/libs/math/performance/test_igamma.cpp | 99 +++++++++++++
sandbox/math_toolkit/libs/math/project-root.jam | 4
sandbox/math_toolkit/libs/math/test/CMakeLists.txt | 6
sandbox/math_toolkit/libs/math/test/Jamfile.v2 | 301 +++++++++++++++++++++------------------
sandbox/math_toolkit/libs/math/test/hypot_test.cpp | 2
sandbox/math_toolkit/libs/math/test/log1p_expm1_test.cpp | 2
sandbox/math_toolkit/libs/math/test/pow_test.cpp | 2
sandbox/math_toolkit/libs/math/test/powm1_sqrtp1m1_test.cpp | 2
sandbox/math_toolkit/libs/math/test/test_bernoulli.cpp | 2
sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp | 2
sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp | 2
sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp | 2
sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp | 2
sandbox/math_toolkit/libs/math/test/test_beta.cpp | 12
sandbox/math_toolkit/libs/math/test/test_beta_dist.cpp | 4
sandbox/math_toolkit/libs/math/test/test_binomial.cpp | 2
sandbox/math_toolkit/libs/math/test/test_binomial_coeff.cpp | 6
sandbox/math_toolkit/libs/math/test/test_carlson.cpp | 2
sandbox/math_toolkit/libs/math/test/test_cauchy.cpp | 2
sandbox/math_toolkit/libs/math/test/test_cbrt.cpp | 2
sandbox/math_toolkit/libs/math/test/test_chi_squared.cpp | 2
sandbox/math_toolkit/libs/math/test/test_classify.cpp | 2
sandbox/math_toolkit/libs/math/test/test_constants.cpp | 2
sandbox/math_toolkit/libs/math/test/test_digamma.cpp | 2
sandbox/math_toolkit/libs/math/test/test_dist_overloads.cpp | 2
sandbox/math_toolkit/libs/math/test/test_ellint_1.cpp | 2
sandbox/math_toolkit/libs/math/test/test_ellint_2.cpp | 6
sandbox/math_toolkit/libs/math/test/test_ellint_3.cpp | 2
sandbox/math_toolkit/libs/math/test/test_erf.cpp | 2
sandbox/math_toolkit/libs/math/test/test_error_handling.cpp | 2
sandbox/math_toolkit/libs/math/test/test_expint.cpp | 2
sandbox/math_toolkit/libs/math/test/test_exponential_dist.cpp | 2
sandbox/math_toolkit/libs/math/test/test_extreme_value.cpp | 2
sandbox/math_toolkit/libs/math/test/test_factorials.cpp | 4
sandbox/math_toolkit/libs/math/test/test_find_location.cpp | 2
sandbox/math_toolkit/libs/math/test/test_find_scale.cpp | 2
sandbox/math_toolkit/libs/math/test/test_fisher_f.cpp | 2
sandbox/math_toolkit/libs/math/test/test_gamma.cpp | 2
sandbox/math_toolkit/libs/math/test/test_gamma_dist.cpp | 2
sandbox/math_toolkit/libs/math/test/test_gamma_hooks.hpp | 105 +++++++++++++
sandbox/math_toolkit/libs/math/test/test_hermite.cpp | 2
sandbox/math_toolkit/libs/math/test/test_hypergeometric_dist.cpp | 4
sandbox/math_toolkit/libs/math/test/test_ibeta.cpp | 6
sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp | 2
sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp | 2
sandbox/math_toolkit/libs/math/test/test_igamma.cpp | 8
sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp | 27 +++
sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp | 4
sandbox/math_toolkit/libs/math/test/test_inv_hyp.cpp | 2
sandbox/math_toolkit/libs/math/test/test_laguerre.cpp | 2
sandbox/math_toolkit/libs/math/test/test_laplace.cpp | 2
sandbox/math_toolkit/libs/math/test/test_legendre.cpp | 2
sandbox/math_toolkit/libs/math/test/test_logistic_dist.cpp | 4
sandbox/math_toolkit/libs/math/test/test_lognormal.cpp | 2
sandbox/math_toolkit/libs/math/test/test_minima.cpp | 2
sandbox/math_toolkit/libs/math/test/test_nc_beta.cpp | 10
sandbox/math_toolkit/libs/math/test/test_nc_chi_squared.cpp | 4
sandbox/math_toolkit/libs/math/test/test_nc_f.cpp | 4
sandbox/math_toolkit/libs/math/test/test_nc_t.cpp | 4
sandbox/math_toolkit/libs/math/test/test_negative_binomial.cpp | 4
sandbox/math_toolkit/libs/math/test/test_next.cpp | 2
sandbox/math_toolkit/libs/math/test/test_normal.cpp | 2
sandbox/math_toolkit/libs/math/test/test_pareto.cpp | 2
sandbox/math_toolkit/libs/math/test/test_poisson.cpp | 2
sandbox/math_toolkit/libs/math/test/test_policy.cpp | 3
sandbox/math_toolkit/libs/math/test/test_policy_2.cpp | 3
sandbox/math_toolkit/libs/math/test/test_policy_3.cpp | 3
sandbox/math_toolkit/libs/math/test/test_policy_4.cpp | 3
sandbox/math_toolkit/libs/math/test/test_policy_5.cpp | 3
sandbox/math_toolkit/libs/math/test/test_policy_6.cpp | 3
sandbox/math_toolkit/libs/math/test/test_policy_7.cpp | 18 --
sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp | 2
sandbox/math_toolkit/libs/math/test/test_rationals.cpp | 2
sandbox/math_toolkit/libs/math/test/test_rayleigh.cpp | 2
sandbox/math_toolkit/libs/math/test/test_remez.cpp | 2
sandbox/math_toolkit/libs/math/test/test_roots.cpp | 4
sandbox/math_toolkit/libs/math/test/test_round.cpp | 2
sandbox/math_toolkit/libs/math/test/test_spherical_harmonic.cpp | 2
sandbox/math_toolkit/libs/math/test/test_students_t.cpp | 2
sandbox/math_toolkit/libs/math/test/test_tgamma_ratio.cpp | 2
sandbox/math_toolkit/libs/math/test/test_toms748_solve.cpp | 2
sandbox/math_toolkit/libs/math/test/test_tr1.cpp | 2
sandbox/math_toolkit/libs/math/test/test_triangular.cpp | 2
sandbox/math_toolkit/libs/math/test/test_uniform.cpp | 2
sandbox/math_toolkit/libs/math/test/test_weibull.cpp | 2
sandbox/math_toolkit/libs/math/test/test_zeta.cpp | 6
134 files changed, 1611 insertions(+), 603 deletions(-)
Modified: sandbox/math_toolkit/boost/math/distributions/detail/hypergeometric_pdf.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/detail/hypergeometric_pdf.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/detail/hypergeometric_pdf.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -82,6 +82,10 @@
do{
exponents[sorted_indexes[0]] -= exponents[sorted_indexes[1]];
bases[sorted_indexes[1]] *= bases[sorted_indexes[0]];
+ if((bases[sorted_indexes[1]] < tools::min_value<T>()) && (exponents[sorted_indexes[1]] != 0))
+ {
+ return 0;
+ }
base_e_factors[sorted_indexes[1]] += base_e_factors[sorted_indexes[0]];
bubble_down_one(sorted_indexes, sorted_indexes + 9, sort_functor<T>(exponents));
}while(exponents[sorted_indexes[1]] > 1);
@@ -104,15 +108,39 @@
--j;
}
- T result = pow(bases[sorted_indexes[0]] * exp(static_cast<T>(base_e_factors[sorted_indexes[0]])), exponents[sorted_indexes[0]]);
+#ifdef BOOST_MATH_INSTRUMENT
+ BOOST_MATH_INSTRUMENT_FPU
+ for(unsigned i = 0; i < 9; ++i)
+ {
+ BOOST_MATH_INSTRUMENT_VARIABLE(i);
+ BOOST_MATH_INSTRUMENT_VARIABLE(bases[i]);
+ BOOST_MATH_INSTRUMENT_VARIABLE(exponents[i]);
+ BOOST_MATH_INSTRUMENT_VARIABLE(base_e_factors[i]);
+ BOOST_MATH_INSTRUMENT_VARIABLE(sorted_indexes[i]);
+ }
+#endif
+
+ T result;
+ BOOST_MATH_INSTRUMENT_VARIABLE(bases[sorted_indexes[0]] * exp(static_cast<T>(base_e_factors[sorted_indexes[0]])));
+ BOOST_MATH_INSTRUMENT_VARIABLE(exponents[sorted_indexes[0]]);
+ {
+ BOOST_FPU_EXCEPTION_GUARD
+ result = pow(bases[sorted_indexes[0]] * exp(static_cast<T>(base_e_factors[sorted_indexes[0]])), exponents[sorted_indexes[0]]);
+ }
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
for(unsigned i = 1; (i < 9) && (exponents[sorted_indexes[i]] > 0); ++i)
{
+ BOOST_FPU_EXCEPTION_GUARD
+ if(result < tools::min_value<T>())
+ return 0; // short circuit further evaluation
if(exponents[sorted_indexes[i]] == 1)
result *= bases[sorted_indexes[i]] * exp(static_cast<T>(base_e_factors[sorted_indexes[i]]));
else if(exponents[sorted_indexes[i]] == 0.5f)
result *= sqrt(bases[sorted_indexes[i]] * exp(static_cast<T>(base_e_factors[sorted_indexes[i]])));
else
result *= pow(bases[sorted_indexes[i]] * exp(static_cast<T>(base_e_factors[sorted_indexes[i]])), exponents[sorted_indexes[i]]);
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
}
result *= Lanczos::lanczos_sum_expG_scaled(static_cast<T>(n + 1))
@@ -126,6 +154,7 @@
* Lanczos::lanczos_sum_expG_scaled(static_cast<T>(r - x + 1))
* Lanczos::lanczos_sum_expG_scaled(static_cast<T>(N - n - r + x + 1)));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
return result;
}
@@ -172,7 +201,11 @@
return boost::math::pow<8>(x);
}
BOOST_MATH_STD_USING
+#ifdef __SUNPRO_CC
+ return pow(x, T(ex));
+#else
return pow(x, ex);
+#endif
}
template <class T>
struct hypergeometric_pdf_prime_loop_result_entry
Modified: sandbox/math_toolkit/boost/math/distributions/detail/hypergeometric_quantile.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/detail/hypergeometric_quantile.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/detail/hypergeometric_quantile.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -17,7 +17,10 @@
inline unsigned round_x_from_p(unsigned x, T p, T cum, T fudge_factor, unsigned lbound, unsigned /*ubound*/, const policies::discrete_quantile<policies::integer_round_down>&)
{
if((p < cum * fudge_factor) && (x != lbound))
+ {
+ BOOST_MATH_INSTRUMENT_VARIABLE(x-1);
return --x;
+ }
return x;
}
@@ -25,7 +28,10 @@
inline unsigned round_x_from_p(unsigned x, T p, T cum, T fudge_factor, unsigned /*lbound*/, unsigned ubound, const policies::discrete_quantile<policies::integer_round_up>&)
{
if((cum < p * fudge_factor) && (x != ubound))
+ {
+ BOOST_MATH_INSTRUMENT_VARIABLE(x+1);
return ++x;
+ }
return x;
}
@@ -55,7 +61,10 @@
inline unsigned round_x_from_q(unsigned x, T q, T cum, T fudge_factor, unsigned lbound, unsigned /*ubound*/, const policies::discrete_quantile<policies::integer_round_down>&)
{
if((q * fudge_factor > cum) && (x != lbound))
+ {
+ BOOST_MATH_INSTRUMENT_VARIABLE(x-1);
return --x;
+ }
return x;
}
@@ -63,7 +72,10 @@
inline unsigned round_x_from_q(unsigned x, T q, T cum, T fudge_factor, unsigned /*lbound*/, unsigned ubound, const policies::discrete_quantile<policies::integer_round_up>&)
{
if((q < cum * fudge_factor) && (x != ubound))
+ {
+ BOOST_MATH_INSTRUMENT_VARIABLE(x+1);
return ++x;
+ }
return x;
}
@@ -98,11 +110,21 @@
#endif
typedef typename Policy::discrete_quantile_type discrete_quantile_type;
BOOST_MATH_STD_USING
+ BOOST_FPU_EXCEPTION_GUARD
T result;
- T fudge_factor = 1 + tools::epsilon<T>() * ((N <= boost::math::prime(boost::math::max_prime - 1)) ? 50 : N);
+ T fudge_factor = 1 + tools::epsilon<T>() * ((N <= boost::math::prime(boost::math::max_prime - 1)) ? 50 : 2 * N);
unsigned base = static_cast<unsigned>((std::max)(0, (int)(n + r) - (int)(N)));
unsigned lim = (std::min)(r, n);
+ BOOST_MATH_INSTRUMENT_VARIABLE(p);
+ BOOST_MATH_INSTRUMENT_VARIABLE(q);
+ BOOST_MATH_INSTRUMENT_VARIABLE(r);
+ BOOST_MATH_INSTRUMENT_VARIABLE(n);
+ BOOST_MATH_INSTRUMENT_VARIABLE(N);
+ BOOST_MATH_INSTRUMENT_VARIABLE(fudge_factor);
+ BOOST_MATH_INSTRUMENT_VARIABLE(base);
+ BOOST_MATH_INSTRUMENT_VARIABLE(lim);
+
if(p <= 0.5)
{
unsigned x = base;
@@ -110,13 +132,21 @@
T diff = result;
while(result < p)
{
- diff = (diff > tools::min_value<T>())
+ diff = (diff > tools::min_value<T>() * 8)
? T(n - x) * T(r - x) * diff / (T(x + 1) * T(N + x + 1 - n - r))
: hypergeometric_pdf<T>(x + 1, r, n, N, pol);
if(result + diff / 2 > p)
break;
++x;
result += diff;
+#ifdef BOOST_MATH_INSTRUMENT
+ if(diff != 0)
+ {
+ BOOST_MATH_INSTRUMENT_VARIABLE(x);
+ BOOST_MATH_INSTRUMENT_VARIABLE(diff);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
+#endif
}
return round_x_from_p(x, p, result, fudge_factor, base, lim, discrete_quantile_type());
}
@@ -128,10 +158,18 @@
while(result + diff / 2 < q)
{
result += diff;
- diff = (diff > tools::min_value<T>())
+ diff = (diff > tools::min_value<T>() * 8)
? x * T(N + x - n - r) * diff / (T(1 + n - x) * T(1 + r - x))
: hypergeometric_pdf<T>(x - 1, r, n, N, pol);
--x;
+#ifdef BOOST_MATH_INSTRUMENT
+ if(diff != 0)
+ {
+ BOOST_MATH_INSTRUMENT_VARIABLE(x);
+ BOOST_MATH_INSTRUMENT_VARIABLE(diff);
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
+#endif
}
return round_x_from_q(x, q, result, fudge_factor, base, lim, discrete_quantile_type());
}
Modified: sandbox/math_toolkit/boost/math/distributions/non_central_beta.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/non_central_beta.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/non_central_beta.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -38,7 +38,7 @@
// Variables come first:
//
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
T l2 = lam / 2;
//
// k is the starting point for iteration, and is the
@@ -116,7 +116,7 @@
// Variables come first:
//
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
T l2 = lam / 2;
//
// k is the starting point for iteration, and is the
@@ -499,7 +499,7 @@
// Variables come first:
//
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
T l2 = lam / 2;
//
// k is the starting point for iteration, and is the
Modified: sandbox/math_toolkit/boost/math/distributions/non_central_chi_squared.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/non_central_chi_squared.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/non_central_chi_squared.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -63,7 +63,7 @@
T del = f / 2;
T y = x / 2;
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
T sum = init_sum;
//
// k is the starting location for iteration, we'll
@@ -158,7 +158,7 @@
return sum;
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
int i;
T lterm(0), term(0);
@@ -203,7 +203,7 @@
if(y == 0)
return 0;
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
T errorf(0), errorb(0);
T x = y / 2;
@@ -289,7 +289,7 @@
//
BOOST_MATH_STD_USING
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
T x2 = x / 2;
T n2 = n / 2;
T l2 = lambda / 2;
Modified: sandbox/math_toolkit/boost/math/distributions/non_central_t.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/distributions/non_central_t.hpp (original)
+++ sandbox/math_toolkit/boost/math/distributions/non_central_t.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -34,7 +34,7 @@
// Variables come first:
//
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = policies::get_epsilon<T, Policy>();
T d2 = delta * delta / 2;
//
// k is the starting point for iteration, and is the
@@ -104,7 +104,7 @@
// Variables come first:
//
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
T d2 = delta * delta / 2;
//
// k is the starting point for iteration, and is the
@@ -319,7 +319,7 @@
// Variables come first:
//
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- T errtol = ldexp(1.0f, -boost::math::policies::digits<T, Policy>());
+ T errtol = boost::math::policies::get_epsilon<T, Policy>();
T d2 = delta * delta / 2;
//
// k is the starting point for iteration, and is the
Modified: sandbox/math_toolkit/boost/math/policies/error_handling.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/policies/error_handling.hpp (original)
+++ sandbox/math_toolkit/boost/math/policies/error_handling.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -632,6 +632,15 @@
"Series evaluation exceeded %1% iterations, giving up now.", max_iter, pol);
}
+template <class Policy>
+inline void check_root_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol)
+{
+ if(max_iter >= policies::get_max_root_iterations<Policy>())
+ raise_evaluation_error<boost::uintmax_t>(
+ function,
+ "Root finding evaluation exceeded %1% iterations, giving up now.", max_iter, pol);
+}
+
} //namespace policies
#ifdef BOOST_MSVC
Modified: sandbox/math_toolkit/boost/math/policies/policy.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/policies/policy.hpp (original)
+++ sandbox/math_toolkit/boost/math/policies/policy.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -34,6 +34,8 @@
template <class T>
int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+template <class T>
+T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
}
@@ -285,13 +287,13 @@
template <class T>
struct is_valid_policy_imp
{
- BOOST_STATIC_CONSTANT(bool, value = sizeof(test_is_valid_arg(static_cast<T*>(0))) == 1);
+ BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast<T*>(0))) == 1);
};
template <class T>
struct is_default_policy_imp
{
- BOOST_STATIC_CONSTANT(bool, value = sizeof(test_is_default_arg(static_cast<T*>(0))) == 1);
+ BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast<T*>(0))) == 1);
};
template <class T> struct is_valid_policy
@@ -854,8 +856,74 @@
namespace detail{
-template <class A1,
- class A2,
+template <class T, class Digits, class Small, class Default>
+struct series_factor_calc
+{
+ static const T get()
+ {
+ return ldexp(T(1.0), 1 - Digits::value);
+ }
+};
+
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::true_>
+{
+ static const T get()
+ {
+ return boost::math::tools::epsilon<T>();
+ }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::false_>
+{
+ static const T get()
+ {
+ static const boost::uintmax_t v = static_cast<boost::uintmax_t>(1u) << (Digits::value - 1);
+ return 1 / static_cast<T>(v);
+ }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::false_, mpl::true_>
+{
+ static const T get()
+ {
+ return boost::math::tools::epsilon<T>();
+ }
+};
+
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::true_ const&)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+ typedef typename boost::math::policies::precision<T, Policy>::type p_t;
+ typedef mpl::bool_<p_t::value <= std::numeric_limits<boost::uintmax_t>::digits> is_small_int;
+ typedef mpl::bool_<p_t::value >= std::numeric_limits<T>::digits> is_default_value;
+ return series_factor_calc<T, p_t, is_small_int, is_default_value>::get();
+}
+
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::false_ const&)
+{
+ return tools::epsilon<T>();
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type;
+ return detail::get_epsilon_imp<T, Policy>(tag_type());
+}
+
+namespace detail{
+
+template <class A1,
+ class A2,
class A3,
class A4,
class A5,
@@ -871,7 +939,7 @@
template <class P>
struct is_policy_imp
{
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(test_is_policy(static_cast<P*>(0))) == 1));
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast<P*>(0))) == 1));
};
}
Modified: sandbox/math_toolkit/boost/math/special_functions/bessel.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/bessel.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/bessel.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -94,9 +94,9 @@
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
T zero = 0;
- T result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter, zero);
+ T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, zero);
#else
- T result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter);
+ T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter);
#endif
policies::check_series_iterations("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol);
return result;
@@ -110,9 +110,9 @@
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
T zero = 0;
- T result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter, zero);
+ T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, zero);
#else
- T result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter);
+ T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter);
#endif
policies::check_series_iterations("boost::math::sph_bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol);
return result * sqrt(constants::pi<T>() / 4);
@@ -244,9 +244,13 @@
if(v == 0.5f)
{
// common special case, note try and avoid overflow in exp(x):
+ if(x >= tools::log_max_value<T>())
+ {
T e = exp(x / 2);
return e * (e / sqrt(2 * x * constants::pi<T>()));
}
+ return sqrt(2 / (x * constants::pi<T>())) * sinh(x);
+ }
if(policies::digits<T, Policy>() <= 64)
{
if(v == 0)
Modified: sandbox/math_toolkit/boost/math/special_functions/beta.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/beta.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/beta.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -161,11 +161,11 @@
// calculate the fraction parts:
T sa = detail::lower_gamma_series(a, la, pol) / a;
- sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::digits<T, Policy>());
+ sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::get_epsilon<T, Policy>());
T sb = detail::lower_gamma_series(b, lb, pol) / b;
- sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::digits<T, Policy>());
+ sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::get_epsilon<T, Policy>());
T sc = detail::lower_gamma_series(c, lc, pol) / c;
- sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::digits<T, Policy>());
+ sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::get_epsilon<T, Policy>());
// and the exponent part:
result = exp(lc - la - lb) * pow(la/lc, a) * pow(lb/lc, b);
@@ -398,11 +398,11 @@
T lc = a + b + 5;
// gamma function partials:
T sa = detail::lower_gamma_series(a, la, pol) / a;
- sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::digits<T, Policy>());
+ sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::get_epsilon<T, Policy>());
T sb = detail::lower_gamma_series(b, lb, pol) / b;
- sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::digits<T, Policy>());
+ sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::get_epsilon<T, Policy>());
T sc = detail::lower_gamma_series(c, lc, pol) / c;
- sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::digits<T, Policy>());
+ sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::get_epsilon<T, Policy>());
// gamma function powers combined with incomplete beta powers:
T b1 = (x * lc) / la;
@@ -502,7 +502,7 @@
return s0; // Safeguard: series can't cope with denorms.
ibeta_series_t<T> s(a, b, x, result);
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter, s0);
+ result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, s0);
policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (with lanczos)", max_iter, pol);
return result;
}
@@ -532,11 +532,11 @@
// calculate the gamma parts:
T sa = detail::lower_gamma_series(a, la, pol) / a;
- sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::digits<T, Policy>());
+ sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::get_epsilon<T, Policy>());
T sb = detail::lower_gamma_series(b, lb, pol) / b;
- sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::digits<T, Policy>());
+ sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::get_epsilon<T, Policy>());
T sc = detail::lower_gamma_series(c, lc, pol) / c;
- sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::digits<T, Policy>());
+ sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::get_epsilon<T, Policy>());
// and their combined power-terms:
T b1 = (x * lc) / la;
@@ -582,7 +582,7 @@
return s0; // Safeguard: series can't cope with denorms.
ibeta_series_t<T> s(a, b, x, result);
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- result = boost::math::tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter, s0);
+ result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, s0);
policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (without lanczos)", max_iter, pol);
return result;
}
@@ -634,7 +634,7 @@
return result;
ibeta_fraction2_t<T> f(a, b, x);
- T fract = boost::math::tools::continued_fraction_b(f, boost::math::policies::digits<T, Policy>());
+ T fract = boost::math::tools::continued_fraction_b(f, boost::math::policies::get_epsilon<T, Policy>());
return result / fract;
}
//
Modified: sandbox/math_toolkit/boost/math/special_functions/binomial.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/binomial.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/binomial.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -19,6 +19,7 @@
template <class T, class Policy>
T binomial_coefficient(unsigned n, unsigned k, const Policy& pol)
{
+ BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
BOOST_MATH_STD_USING
static const char* function = "boost::math::binomial_coefficient<%1%>(unsigned, unsigned)";
if(k > n)
Modified: sandbox/math_toolkit/boost/math/special_functions/cbrt.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/cbrt.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/cbrt.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -32,7 +32,7 @@
};
template <class T, class Policy>
-T cbrt_imp(T z, const Policy&)
+T cbrt_imp(T z, const Policy& pol)
{
BOOST_MATH_STD_USING
int i_exp, sign(1);
@@ -49,7 +49,10 @@
T max = static_cast<T>(ldexp(2.0, i_exp/3));
T guess = static_cast<T>(ldexp(1.0, i_exp/3));
int digits = (policies::digits<T, Policy>()) / 2;
- return sign * tools::halley_iterate(detail::cbrt_functor<T>(z), guess, min, max, digits);
+ boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
+ guess = sign * tools::halley_iterate(detail::cbrt_functor<T>(z), guess, min, max, digits, max_iter);
+ policies::check_root_iterations("boost::math::cbrt<%1%>", max_iter, pol);
+ return guess;
}
} // namespace detail
Modified: sandbox/math_toolkit/boost/math/special_functions/detail/erf_inv.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/erf_inv.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/erf_inv.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -304,14 +304,16 @@
//
if(policies::digits<T, Policy>() > 64)
{
+ boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
if(p <= 0.5)
{
- result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(p, 1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3);
+ result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(p, 1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3, max_iter);
}
else
{
- result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(q, -1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3);
+ result = tools::halley_iterate(detail::erf_roots<typename remove_cv<T>::type, Policy>(q, -1), guess, static_cast<T>(0), tools::max_value<T>(), (policies::digits<T, Policy>() * 2) / 3, max_iter);
}
+ policies::check_root_iterations("boost::math::erf_inv<%1%>", max_iter, pol);
}
else
{
Modified: sandbox/math_toolkit/boost/math/special_functions/detail/fp_traits.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/fp_traits.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/fp_traits.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -117,7 +117,7 @@
Most processors support three different floating point precisions:
single precision (32 bits), double precision (64 bits)
and extended double precision (80 - 128 bits, depending on the processor)
-
+
Note that the C++ type long double can be implemented
both as double precision and extended double precision.
*/
@@ -551,7 +551,7 @@
template<class T> struct fp_traits
{
-#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
typedef typename select_native<T>::type type;
#else
typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
Modified: sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/ibeta_inverse.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -795,8 +795,10 @@
// Now iterate, we can use either p or q as the target here
// depending on which is smaller:
//
+ boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
x = boost::math::tools::halley_iterate(
- boost::math::detail::ibeta_roots<T, Policy>(a, b, (p < q ? p : q), (p < q ? false : true)), x, lower, upper, digits);
+ boost::math::detail::ibeta_roots<T, Policy>(a, b, (p < q ? p : q), (p < q ? false : true)), x, lower, upper, digits, max_iter);
+ policies::check_root_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol);
//
// We don't really want these asserts here, but they are useful for sanity
// checking that we have the limits right, uncomment if you suspect bugs *only*.
Modified: sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/igamma_inverse.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -93,7 +93,7 @@
}
template <class T, class Policy>
-T find_inverse_gamma(T a, T p, T q, const Policy& pol)
+T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits)
{
//
// In order to understand what's going on here, you will
@@ -107,6 +107,7 @@
BOOST_MATH_STD_USING
T result;
+ *p_has_10_digits = false;
if(a == 1)
{
@@ -191,6 +192,8 @@
T y_4 = y_2 * y_2;
result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4);
BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ if(b < 1e-28f)
+ *p_has_10_digits = true;
}
}
else
@@ -218,6 +221,7 @@
if((a >= 500) && (fabs(1 - w / a) < 1e-6))
{
result = w;
+ *p_has_10_digits = true;
BOOST_MATH_INSTRUMENT_VARIABLE(result);
}
else if (p > 0.5)
@@ -269,25 +273,37 @@
}
else
{
+ T z = w;
+ T ap1 = a + 1;
+ if(w < 0.15f * ap1)
+ {
// DiDonato and Morris Eq 35:
- T z = didonato_FN(p, a, w, 0, T(0), pol);
- z = didonato_FN(p, a, z, 2, T(0), pol);
- z = didonato_FN(p, a, z, 2, T(0), pol);
- z = didonato_FN(p, a, z, 3, T(0), pol);
-
+ T v = log(p) + boost::math::lgamma(ap1, pol);
+ T s = 1;
+ z = exp((v + w) / a);
+ s = boost::math::log1p(z / ap1 * (1 + z / (a + 2)));
+ z = exp((v + z - s) / a);
+ z = exp((v + z - s) / a);
+ s = boost::math::log1p(z / ap1 * (1 + z / (a + 2) * (1 + z / (a + 3))));
+ z = exp((v + z - s) / a);
BOOST_MATH_INSTRUMENT_VARIABLE(z);
+ }
- if((z <= 0.01 * (a + 1)) || (z > 0.7 * (a + 1)))
+ if((z <= 0.01 * ap1) || (z > 0.7 * ap1))
{
result = z;
+ if(z <= 0.002 * ap1)
+ *p_has_10_digits = true;
BOOST_MATH_INSTRUMENT_VARIABLE(result);
}
else
{
// DiDonato and Morris Eq 36:
- T zb = didonato_FN(p, a, z, 100, T(1e-4), pol);
- T u = log(p) + boost::math::lgamma(a + 1, pol);
- result = zb * (1 - (a * log(zb) - zb - u + log(didonato_SN(a, z, 100, T(1e-4)))) / (a - zb));
+ T ls = log(didonato_SN(a, z, 100, T(1e-4)));
+ T v = log(p) + boost::math::lgamma(ap1, pol);
+ z = exp((v + z - ls) / a);
+ result = z * (1 - (a * log(z) - z - v + ls) / (a - z));
+
BOOST_MATH_INSTRUMENT_VARIABLE(result);
}
}
@@ -386,7 +402,10 @@
return tools::max_value<T>();
if(p == 0)
return 0;
- T guess = detail::find_inverse_gamma<T>(a, p, 1 - p, pol);
+ bool has_10_digits;
+ T guess = detail::find_inverse_gamma<T>(a, p, 1 - p, pol, &has_10_digits);
+ if((policies::digits<T, Policy>() <= 36) && has_10_digits)
+ return guess;
T lower = tools::min_value<T>();
if(guess <= lower)
guess = tools::min_value<T>();
@@ -397,18 +416,31 @@
// large convergence is slow, so we'll bump it up to full
// precision to prevent premature termination of the root-finding routine.
//
- unsigned digits = (policies::digits<T, Policy>() * 2) / 3;
+ unsigned digits = policies::digits<T, Policy>();
+ if(digits < 30)
+ {
+ digits *= 2;
+ digits /= 3;
+ }
+ else
+ {
+ digits /= 2;
+ digits -= 1;
+ }
if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon<T>())))
digits = policies::digits<T, Policy>() - 2;
//
// Go ahead and iterate:
//
+ boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
guess = tools::halley_iterate(
detail::gamma_p_inverse_func<T, Policy>(a, p, false),
guess,
lower,
tools::max_value<T>(),
- digits);
+ digits,
+ max_iter);
+ policies::check_root_iterations(function, max_iter, pol);
BOOST_MATH_INSTRUMENT_VARIABLE(guess);
if(guess == lower)
guess = policies::raise_underflow_error<T>(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol);
@@ -430,7 +462,10 @@
return tools::max_value<T>();
if(q == 1)
return 0;
- T guess = detail::find_inverse_gamma<T>(a, 1 - q, q, pol);
+ bool has_10_digits;
+ T guess = detail::find_inverse_gamma<T>(a, 1 - q, q, pol, &has_10_digits);
+ if((policies::digits<T, Policy>() <= 36) && has_10_digits)
+ return guess;
T lower = tools::min_value<T>();
if(guess <= lower)
guess = tools::min_value<T>();
@@ -440,18 +475,31 @@
// large convergence is slow, so we'll bump it up to full
// precision to prevent premature termination of the root-finding routine.
//
- unsigned digits = (policies::digits<T, Policy>() * 2) / 3;
+ unsigned digits = policies::digits<T, Policy>();
+ if(digits < 30)
+ {
+ digits *= 2;
+ digits /= 3;
+ }
+ else
+ {
+ digits /= 2;
+ digits -= 1;
+ }
if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon<T>())))
digits = policies::digits<T, Policy>();
//
// Go ahead and iterate:
//
+ boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
guess = tools::halley_iterate(
detail::gamma_p_inverse_func<T, Policy>(a, q, true),
guess,
lower,
tools::max_value<T>(),
- digits);
+ digits,
+ max_iter);
+ policies::check_root_iterations(function, max_iter, pol);
if(guess == lower)
guess = policies::raise_underflow_error<T>(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol);
return guess;
Modified: sandbox/math_toolkit/boost/math/special_functions/detail/lanczos_sse2.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/detail/lanczos_sse2.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/detail/lanczos_sse2.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -12,7 +12,7 @@
#include <emmintrin.h>
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__PGI)
#define ALIGN16 __attribute__((aligned(16)))
#else
#define ALIGN16 __declspec(align(16))
Modified: sandbox/math_toolkit/boost/math/special_functions/erf.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/erf.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/erf.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -133,7 +133,7 @@
{
detail::erf_asympt_series_t<T> s(z);
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- result = boost::math::tools::sum_series(s, policies::digits<T, Policy>(), max_iter, 1);
+ result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, 1);
policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol);
}
else
@@ -160,7 +160,7 @@
invert = !invert;
result = z * exp(-x);
result /= sqrt(boost::math::constants::pi<T>());
- result *= upper_gamma_fraction(T(0.5f), x, policies::digits<T, Policy>());
+ result *= upper_gamma_fraction(T(0.5f), x, policies::get_epsilon<T, Policy>());
}
}
if(invert)
@@ -197,14 +197,17 @@
//
// We're going to calculate erf:
//
+ if(z < 1e-10)
+ {
if(z == 0)
{
result = T(0);
}
- else if(z < 1e-10)
+ else
{
result = static_cast<T>(z * 1.125f + z * 0.003379167095512573896158903121545171688L);
}
+ }
else
{
// Maximum Deviation Found: 1.561e-17
@@ -227,10 +230,11 @@
0.00858571925074406212772L,
0.000370900071787748000569L,
};
- result = z * (Y + tools::evaluate_polynomial(P, z * z) / tools::evaluate_polynomial(Q, z * z));
+ T zz = z * z;
+ result = z * (Y + tools::evaluate_polynomial(P, zz) / tools::evaluate_polynomial(Q, zz));
}
}
- else if((z < 14) || ((z < 28) && invert))
+ else if(invert ? (z < 28) : (z < 5.8f))
{
//
// We'll be calculating erfc:
@@ -425,7 +429,7 @@
result = z * (Y + tools::evaluate_polynomial(P, z * z) / tools::evaluate_polynomial(Q, z * z));
}
}
- else if((z < 110) || ((z < 110) && invert)) // TODO FIXME!!!
+ else if(invert ? (z < 110) : (z < 6.4f))
{
//
// We'll be calculating erfc:
@@ -634,7 +638,7 @@
result = z * (Y + tools::evaluate_polynomial(P, z * z) / tools::evaluate_polynomial(Q, z * z));
}
}
- else if((z < 9) || ((z < 110) && invert))
+ else if(invert ? (z < 110) : (z < 8.65f))
{
//
// We'll be calculating erfc:
Modified: sandbox/math_toolkit/boost/math/special_functions/expint.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/expint.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/expint.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -365,7 +365,7 @@
expint_fraction<T> f(n, z);
T result = tools::continued_fraction_b(
f,
- tools::digits<T>(),
+ boost::math::policies::get_epsilon<T, Policy>(),
max_iter);
policies::check_series_iterations("boost::math::expint_continued_fraction<%1%>(unsigned,%1%)", max_iter, pol);
BOOST_MATH_INSTRUMENT_VARIABLE(result)
@@ -422,7 +422,7 @@
BOOST_MATH_INSTRUMENT_VARIABLE(result)
expint_series<T> s(k, z, x_k, denom, fact);
- result = tools::sum_series(s, policies::digits<T, Policy>(), max_iter, result);
+ result = tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, result);
policies::check_series_iterations("boost::math::expint_series<%1%>(unsigned,%1%)", max_iter, pol);
BOOST_MATH_INSTRUMENT_VARIABLE(result)
BOOST_MATH_INSTRUMENT_VARIABLE(max_iter)
@@ -495,7 +495,7 @@
result += constants::euler<T>();
expint_i_series<T> s(z);
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- result = tools::sum_series(s, policies::digits<T, Policy>(), max_iter, result);
+ result = tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, result);
policies::check_series_iterations("boost::math::expint_i_series<%1%>(%1%)", max_iter, pol);
return result;
}
Modified: sandbox/math_toolkit/boost/math/special_functions/expm1.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/expm1.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/expm1.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -90,10 +90,10 @@
detail::expm1_series<T> s(x);
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
- T result = tools::sum_series(s, policies::digits<T, Policy>(), max_iter);
+ T result = tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter);
#else
T zero = 0;
- T result = tools::sum_series(s, policies::digits<T, Policy>(), max_iter, zero);
+ T result = tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, zero);
#endif
policies::check_series_iterations("boost::math::expm1<%1%>(%1%)", max_iter, pol);
return result;
@@ -267,10 +267,12 @@
#if defined(BOOST_HAS_EXPM1) && !(defined(__osf__) && defined(__DECCXX_VER))
# ifdef BOOST_MATH_USE_C99
inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); }
+# ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); }
-#else
+# endif
+# else
inline float expm1(float x, const policies::policy<>&){ return ::expm1(x); }
-#endif
+# endif
inline double expm1(double x, const policies::policy<>&){ return ::expm1(x); }
#endif
Modified: sandbox/math_toolkit/boost/math/special_functions/factorials.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/factorials.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/factorials.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -30,6 +30,7 @@
template <class T, class Policy>
inline T factorial(unsigned i, const Policy& pol)
{
+ BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
BOOST_MATH_STD_USING // Aid ADL for floor.
if(i <= max_factorial<T>::value)
@@ -66,6 +67,7 @@
template <class T, class Policy>
T double_factorial(unsigned i, const Policy& pol)
{
+ BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
BOOST_MATH_STD_USING // ADL lookup of std names
if(i & 1)
{
@@ -108,6 +110,7 @@
template <class T, class Policy>
T rising_factorial_imp(T x, int n, const Policy& pol)
{
+ BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
if(x < 0)
{
//
@@ -143,6 +146,7 @@
template <class T, class Policy>
inline T falling_factorial_imp(T x, unsigned n, const Policy& pol)
{
+ BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
BOOST_MATH_STD_USING // ADL of std names
if(x == 0)
return 0;
Modified: sandbox/math_toolkit/boost/math/special_functions/gamma.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/gamma.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/gamma.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -296,13 +296,13 @@
};
template <class T>
-inline T upper_gamma_fraction(T a, T z, int bits)
+inline T upper_gamma_fraction(T a, T z, T eps)
{
// Multiply result by z^a * e^-z to get the full
// upper incomplete integral. Divide by tgamma(z)
// to normalise.
upper_incomplete_gamma_fract<T> f(a, z);
- return 1 / (z - a + 1 + boost::math::tools::continued_fraction_a(f, bits));
+ return 1 / (z - a + 1 + boost::math::tools::continued_fraction_a(f, eps));
}
template <class T>
@@ -324,20 +324,15 @@
};
template <class T, class Policy>
-inline T lower_gamma_series(T a, T z, const Policy& pol)
+inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0)
{
// Multiply result by ((z^a) * (e^-z) / a) to get the full
// lower incomplete integral. Then divide by tgamma(a)
// to get the normalised value.
lower_incomplete_gamma_series<T> s(a, z);
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- int bits = policies::digits<T, Policy>();
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- T zero = 0;
- T result = boost::math::tools::sum_series(s, bits, max_iter, zero);
-#else
- T result = boost::math::tools::sum_series(s, bits, max_iter);
-#endif
+ T factor = policies::get_epsilon<T, Policy>();
+ T result = boost::math::tools::sum_series(s, factor, max_iter, init_value);
policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol);
return result;
}
@@ -387,7 +382,7 @@
BOOST_MATH_INSTRUMENT_CODE(prefix);
T sum = detail::lower_gamma_series(z, z, pol) / z;
BOOST_MATH_INSTRUMENT_CODE(sum);
- sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::digits<T, Policy>());
+ sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::get_epsilon<T, Policy>());
BOOST_MATH_INSTRUMENT_CODE(sum);
if(fabs(tools::max_value<T>() / prefix) < fabs(sum))
return policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
@@ -426,7 +421,7 @@
T limit = (std::max)(z+1, T(10));
T prefix = z * log(limit) - limit;
T sum = detail::lower_gamma_series(z, limit, pol) / z;
- sum += detail::upper_gamma_fraction(z, limit, ::boost::math::policies::digits<T, Policy>());
+ sum += detail::upper_gamma_fraction(z, limit, ::boost::math::policies::get_epsilon<T, Policy>());
result = log(sum) + prefix;
}
if(sign)
@@ -691,7 +686,7 @@
T limit = (std::max)(T(10), a);
T sum = detail::lower_gamma_series(a, limit, pol) / a;
- sum += detail::upper_gamma_fraction(a, limit, ::boost::math::policies::digits<T, Policy>());
+ sum += detail::upper_gamma_fraction(a, limit, ::boost::math::policies::get_epsilon<T, Policy>());
if(a < 10)
{
@@ -733,37 +728,43 @@
// Upper gamma fraction for very small a:
//
template <class T, class Policy>
-inline T tgamma_small_upper_part(T a, T x, const Policy& pol)
+inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool invert = false, T* pderivative = 0)
{
BOOST_MATH_STD_USING // ADL of std functions.
//
// Compute the full upper fraction (Q) when a is very small:
//
T result;
- result = boost::math::tgamma1pm1(a, pol) - boost::math::powm1(x, a, pol);
+ result = boost::math::tgamma1pm1(a, pol);
+ if(pgam)
+ *pgam = (result + 1) / a;
+ T p = boost::math::powm1(x, a, pol);
+ result -= p;
result /= a;
detail::small_gamma2_series<T> s(a, x);
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- T zero = 0;
- result -= pow(x, a) * tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter, zero);
-#else
- result -= pow(x, a) * tools::sum_series(s, boost::math::policies::digits<T, Policy>(), max_iter);
-#endif
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>() - 10;
+ p += 1;
+ if(pderivative)
+ *pderivative = p / (*pgam * exp(x));
+ T init_value = invert ? *pgam : 0;
+ result = -p * tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, (init_value - result) / p);
policies::check_series_iterations("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol);
+ if(invert)
+ result = -result;
return result;
}
//
// Upper gamma fraction for integer a:
//
-template <class T>
-inline T finite_gamma_q(T a, T x)
+template <class T, class Policy>
+inline T finite_gamma_q(T a, T x, Policy const& pol, T* pderivative = 0)
{
//
// Calculates normalised Q when a is an integer:
//
BOOST_MATH_STD_USING
- T sum = exp(-x);
+ T e = exp(-x);
+ T sum = e;
if(sum != 0)
{
T term = sum;
@@ -774,6 +775,10 @@
sum += term;
}
}
+ if(pderivative)
+ {
+ *pderivative = e * pow(x, a) / boost::math::unchecked_factorial<T>(itrunc(T(a - 1), pol));
+ }
return sum;
}
//
@@ -834,30 +839,32 @@
BOOST_ASSERT((p_derivative == 0) || (normalised == true));
- bool is_int = floor(a) == a;
- bool is_half_int = (floor(2 * a) == 2 * a) && !is_int;
+ bool is_int, is_half_int;
bool is_small_a = (a < 30) && (a <= x + 1);
+ if(is_small_a)
+ {
+ T fa = floor(a);
+ is_int = (fa == a);
+ is_half_int = is_int ? false : (fabs(fa - a) == 0.5f);
+ }
+ else
+ {
+ is_int = is_half_int = false;
+ }
+
+ int eval_method;
- if(is_int && is_small_a && (x > 0.6))
+ if(is_int && (x > 0.6))
{
// calculate Q via finite sum:
invert = !invert;
- result = finite_gamma_q(a, x);
- if(normalised == false)
- result *= boost::math::tgamma(a, pol);
- // TODO: calculate derivative inside sum:
- if(p_derivative)
- *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ eval_method = 0;
}
- else if(is_half_int && is_small_a && (x > 0.2))
+ else if(is_half_int && (x > 0.2))
{
// calculate Q via finite sum for half integer a:
invert = !invert;
- result = finite_half_gamma_q(a, x, p_derivative, pol);
- if(normalised == false)
- result *= boost::math::tgamma(a, pol);
- if(p_derivative && (*p_derivative == 0))
- *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ eval_method = 1;
}
else if(x < 0.5)
{
@@ -866,47 +873,25 @@
//
if(-0.4 / log(x) < a)
{
- // Compute P:
- result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
- if(p_derivative)
- *p_derivative = result;
- if(result != 0)
- result *= detail::lower_gamma_series(a, x, pol) / a;
+ eval_method = 2;
}
else
{
- // Compute Q:
- invert = !invert;
- result = tgamma_small_upper_part(a, x, pol);
- if(normalised)
- result /= boost::math::tgamma(a, pol);
- if(p_derivative)
- *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ eval_method = 3;
}
}
else if(x < 1.1)
{
//
- // Changover here occurs when P ~ 0.6 or Q ~ 0.4:
+ // Changover here occurs when P ~ 0.75 or Q ~ 0.25:
//
- if(x * 1.1f < a)
+ if(x * 0.75f < a)
{
- // Compute P:
- result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
- if(p_derivative)
- *p_derivative = result;
- if(result != 0)
- result *= detail::lower_gamma_series(a, x, pol) / a;
+ eval_method = 2;
}
else
{
- // Compute Q:
- invert = !invert;
- result = tgamma_small_upper_part(a, x, pol);
- if(normalised)
- result /= boost::math::tgamma(a, pol);
- if(p_derivative)
- *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ eval_method = 3;
}
}
else
@@ -944,6 +929,93 @@
}
if(use_temme)
{
+ eval_method = 5;
+ }
+ else
+ {
+ //
+ // Regular case where the result will not be too close to 0.5.
+ //
+ // Changeover here occurs at P ~ Q ~ 0.5
+ // Note that series computation of P is about x2 faster than continued fraction
+ // calculation of Q, so try and use the CF only when really necessary, especially
+ // for small x.
+ //
+ if(x - (1 / (3 * x)) < a)
+ {
+ eval_method = 2;
+ }
+ else
+ {
+ eval_method = 4;
+ invert = !invert;
+ }
+ }
+ }
+
+ switch(eval_method)
+ {
+ case 0:
+ {
+ result = finite_gamma_q(a, x, pol, p_derivative);
+ if(normalised == false)
+ result *= boost::math::tgamma(a, pol);
+ break;
+ }
+ case 1:
+ {
+ result = finite_half_gamma_q(a, x, p_derivative, pol);
+ if(normalised == false)
+ result *= boost::math::tgamma(a, pol);
+ if(p_derivative && (*p_derivative == 0))
+ *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ break;
+ }
+ case 2:
+ {
+ // Compute P:
+ result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
+ if(p_derivative)
+ *p_derivative = result;
+ if(result != 0)
+ {
+ T init_value = 0;
+ if(invert)
+ {
+ init_value = -a * (normalised ? 1 : boost::math::tgamma(a, pol)) / result;
+ }
+ result *= detail::lower_gamma_series(a, x, pol, init_value) / a;
+ if(invert)
+ {
+ invert = false;
+ result = -result;
+ }
+ }
+ break;
+ }
+ case 3:
+ {
+ // Compute Q:
+ invert = !invert;
+ T g;
+ result = tgamma_small_upper_part(a, x, pol, &g, invert, p_derivative);
+ invert = false;
+ if(normalised)
+ result /= g;
+ break;
+ }
+ case 4:
+ {
+ // Compute Q:
+ result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
+ if(p_derivative)
+ *p_derivative = result;
+ if(result != 0)
+ result *= upper_gamma_fraction(a, x, policies::get_epsilon<T, Policy>());
+ break;
+ }
+ case 5:
+ {
//
// Use compile time dispatch to the appropriate
// Temme asymptotic expansion. This may be dead code
@@ -974,33 +1046,12 @@
invert = !invert;
if(p_derivative)
*p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
+ break;
}
- else
- {
- //
- // Regular case where the result will not be too close to 0.5.
- //
- // Changeover here occurs at P ~ Q ~ 0.5
- //
- result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
- if(p_derivative)
- *p_derivative = result;
- if(x < a)
- {
- // Compute P:
- if(result != 0)
- result *= detail::lower_gamma_series(a, x, pol) / a;
}
- else
- {
- // Compute Q:
- invert = !invert;
- if(result != 0)
- result *= upper_gamma_fraction(a, x, policies::digits<T, Policy>());
- }
- }
- }
+ if(normalised && (result > 1))
+ result = 1;
if(invert)
{
T gam = normalised ? 1 : boost::math::tgamma(a, pol);
@@ -1075,9 +1126,9 @@
}
prefix *= pow(constants::e<T>() / zd, delta);
T sum = detail::lower_gamma_series(z, z, pol) / z;
- sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::digits<T, Policy>());
+ sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::get_epsilon<T, Policy>());
T sumd = detail::lower_gamma_series(zd, zd, pol) / zd;
- sumd += detail::upper_gamma_fraction(zd, zd, ::boost::math::policies::digits<T, Policy>());
+ sumd += detail::upper_gamma_fraction(zd, zd, ::boost::math::policies::get_epsilon<T, Policy>());
sum /= sumd;
if(fabs(tools::max_value<T>() / prefix) < fabs(sum))
return policies::raise_overflow_error<T>("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Result of tgamma is too large to represent.", pol);
@@ -1104,7 +1155,7 @@
//
if((z <= max_factorial<T>::value) && (z + delta <= max_factorial<T>::value))
{
- return unchecked_factorial<T>((unsigned)itrunc(z, pol) - 1) / unchecked_factorial<T>((unsigned)itrunc(T(z + delta)) - 1);
+ return unchecked_factorial<T>((unsigned)itrunc(z, pol) - 1) / unchecked_factorial<T>((unsigned)itrunc(T(z + delta), pol) - 1);
}
}
if(fabs(delta) < 20)
Modified: sandbox/math_toolkit/boost/math/special_functions/log1p.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/log1p.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/log1p.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -95,10 +95,10 @@
detail::log1p_series<result_type> s(x);
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) && !BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
- result_type result = tools::sum_series(s, policies::digits<result_type, Policy>(), max_iter);
+ result_type result = tools::sum_series(s, policies::get_epsilon<result_type, Policy>(), max_iter);
#else
result_type zero = 0;
- result_type result = tools::sum_series(s, policies::digits<result_type, Policy>(), max_iter, zero);
+ result_type result = tools::sum_series(s, policies::get_epsilon<result_type, Policy>(), max_iter, zero);
#endif
policies::check_series_iterations(function, max_iter, pol);
return result;
@@ -384,7 +384,7 @@
if(u == 1.0)
return x;
else
- return log(u)*(x/(u-1.0));
+ return ::log(u)*(x/(u-1.0));
}
template <class Policy>
inline float log1p(float x, const Policy& pol)
@@ -404,7 +404,7 @@
if(u == 1.0)
return x;
else
- return log(u)*(x/(u-1.0));
+ return ::logl(u)*(x/(u-1.0));
}
#endif
@@ -443,9 +443,9 @@
boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
T zero = 0;
- T result = boost::math::tools::sum_series(s, policies::digits<T, Policy>(), max_iter, zero);
+ T result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, zero);
#else
- T result = boost::math::tools::sum_series(s, policies::digits<T, Policy>(), max_iter);
+ T result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter);
#endif
policies::check_series_iterations(function, max_iter, pol);
return result;
Modified: sandbox/math_toolkit/boost/math/special_functions/sign.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/sign.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/sign.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -12,26 +12,73 @@
#include <boost/math/tools/config.hpp>
#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/special_functions/detail/fp_traits.hpp>
namespace boost{ namespace math{
-template <class T>
-inline int sign BOOST_NO_MACRO_EXPAND(const T& z)
-{
- return (z == 0) ? 0 : (z < 0) ? -1 : 1;
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+ template<class T>
+ inline int signbit_impl(T x, native_tag const&)
+ {
+ return (std::signbit)(x);
+ }
+#endif
+
+ template<class T>
+ inline int signbit_impl(T x, generic_tag<true> const&)
+ {
+ return x < 0;
+ }
+
+ template<class T>
+ inline int signbit_impl(T x, generic_tag<false> const&)
+ {
+ return x < 0;
+ }
+
+ template<class T>
+ inline int signbit_impl(T x, ieee_copy_all_bits_tag const&)
+ {
+ typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+ return a & traits::sign ? 1 : 0;
+ }
+
+ template<class T>
+ inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&)
+ {
+ typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+ BOOST_DEDUCED_TYPENAME traits::bits a;
+ traits::get_bits(x,a);
+
+ return a & traits::sign ? 1 : 0;
+ }
+} // namespace detail
+
+template<class T> int (signbit)(T x)
+{ //!< \brief return true if floating-point type t is NaN (Not A Number).
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::signbit_impl(x, method());
}
template <class T>
-inline int signbit BOOST_NO_MACRO_EXPAND(const T& z)
+inline int sign BOOST_NO_MACRO_EXPAND(const T& z)
{
- return (z < 0) ? 1 : 0;
+ return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1;
}
template <class T>
inline T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y)
{
BOOST_MATH_STD_USING
- return fabs(x) * boost::math::sign(y);
+ return fabs(x) * ((boost::math::signbit)(y) ? -1 : 1);
}
} // namespace math
Modified: sandbox/math_toolkit/boost/math/special_functions/zeta.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/zeta.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/zeta.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -113,7 +113,7 @@
zeta_series2<T> f(s);
T result = tools::sum_series(
f,
- tools::digits<T>(),
+ policies::get_epsilon<T, Policy>(),
max_iter);
policies::check_series_iterations("boost::math::zeta_series2<%1%>(%1%)", max_iter, pol);
return result;
Modified: sandbox/math_toolkit/boost/math/tools/config.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/config.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/config.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -60,6 +60,14 @@
//
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#endif
+#if defined(unix) && defined(__INTEL_COMPILER)
+//
+// Intel compiler has sporadic issues compiling std::fpclassify depending on
+// the exact OS version used. Use our own code for this as we know it works
+// well on Intel processors:
+//
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+#endif
#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
// Better safe than sorry, our tests don't support hardware exceptions:
@@ -272,9 +280,11 @@
} // 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;
+# define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0);
#else // All other platforms.
- #define BOOST_FPU_EXCEPTION_GUARD
+# define BOOST_FPU_EXCEPTION_GUARD
+# define BOOST_MATH_INSTRUMENT_FPU
#endif
#ifdef BOOST_MATH_INSTRUMENT
Modified: sandbox/math_toolkit/boost/math/tools/fraction.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/fraction.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/fraction.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -84,8 +84,8 @@
//
// Note that the first a0 returned by generator Gen is disarded.
//
-template <class Gen>
-typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits)
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, const U& factor, boost::uintmax_t& max_terms)
{
BOOST_MATH_STD_USING // ADL of std names
@@ -93,7 +93,6 @@
typedef typename traits::result_type result_type;
typedef typename traits::value_type value_type;
- result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
result_type tiny = tools::min_value<result_type>();
value_type v = g();
@@ -105,6 +104,8 @@
C = f;
D = 0;
+ boost::uintmax_t counter(max_terms);
+
do{
v = g();
D = traits::b(v) + traits::a(v) * D;
@@ -116,50 +117,43 @@
D = 1/D;
delta = C*D;
f = f * delta;
- }while(fabs(delta - 1) > factor);
+ }while((fabs(delta - 1) > factor) && --counter);
+
+ max_terms = max_terms - counter;
return f;
}
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, const U& factor)
+{
+ boost::uintmax_t max_terms = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_b(g, factor, max_terms);
+}
+
template <class Gen>
-typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits, boost::uintmax_t& max_terms)
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits)
{
BOOST_MATH_STD_USING // ADL of std names
typedef detail::fraction_traits<Gen> traits;
typedef typename traits::result_type result_type;
- typedef typename traits::value_type value_type;
result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
- result_type tiny = tools::min_value<result_type>();
-
- value_type v = g();
-
- result_type f, C, D, delta;
- f = traits::b(v);
- if(f == 0)
- f = tiny;
- C = f;
- D = 0;
-
- boost::uintmax_t counter(max_terms);
+ boost::uintmax_t max_terms = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_b(g, factor, max_terms);
+}
- do{
- v = g();
- D = traits::b(v) + traits::a(v) * D;
- if(D == 0)
- D = tiny;
- C = traits::b(v) + traits::a(v) / C;
- if(C == 0)
- C = tiny;
- D = 1/D;
- delta = C*D;
- f = f * delta;
- }while((fabs(delta - 1) > factor) && --counter);
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING // ADL of std names
- max_terms = max_terms - counter;
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
- return f;
+ result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
+ return continued_fraction_b(g, factor, max_terms);
}
//
@@ -176,8 +170,8 @@
//
// Note that the first a1 and b1 returned by generator Gen are both used.
//
-template <class Gen>
-typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits)
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, const U& factor, boost::uintmax_t& max_terms)
{
BOOST_MATH_STD_USING // ADL of std names
@@ -185,7 +179,6 @@
typedef typename traits::result_type result_type;
typedef typename traits::value_type value_type;
- result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
result_type tiny = tools::min_value<result_type>();
value_type v = g();
@@ -198,6 +191,8 @@
C = f;
D = 0;
+ boost::uintmax_t counter(max_terms);
+
do{
v = g();
D = traits::b(v) + traits::a(v) * D;
@@ -209,51 +204,44 @@
D = 1/D;
delta = C*D;
f = f * delta;
- }while(fabs(delta - 1) > factor);
+ }while((fabs(delta - 1) > factor) && --counter);
+
+ max_terms = max_terms - counter;
return a0/f;
}
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, const U& factor)
+{
+ boost::uintmax_t max_iter = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_a(g, factor, max_iter);
+}
+
template <class Gen>
-typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits, boost::uintmax_t& max_terms)
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits)
{
BOOST_MATH_STD_USING // ADL of std names
typedef detail::fraction_traits<Gen> traits;
typedef typename traits::result_type result_type;
- typedef typename traits::value_type value_type;
result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
- result_type tiny = tools::min_value<result_type>();
-
- value_type v = g();
-
- result_type f, C, D, delta, a0;
- f = traits::b(v);
- a0 = traits::a(v);
- if(f == 0)
- f = tiny;
- C = f;
- D = 0;
+ boost::uintmax_t max_iter = (std::numeric_limits<boost::uintmax_t>::max)();
- boost::uintmax_t counter(max_terms);
+ return continued_fraction_a(g, factor, max_iter);
+}
- do{
- v = g();
- D = traits::b(v) + traits::a(v) * D;
- if(D == 0)
- D = tiny;
- C = traits::b(v) + traits::a(v) / C;
- if(C == 0)
- C = tiny;
- D = 1/D;
- delta = C*D;
- f = f * delta;
- }while((fabs(delta - 1) > factor) && --counter);
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING // ADL of std names
- max_terms = max_terms - counter;
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
- return a0/f;
+ result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
+ return continued_fraction_a(g, factor, max_terms);
}
} // namespace tools
Modified: sandbox/math_toolkit/boost/math/tools/roots.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/roots.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/roots.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -346,6 +346,8 @@
{
// last two steps haven't converged, try bisection:
delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
+ if(fabs(delta) > result)
+ delta = sign(delta) * result; // protect against huge jumps!
// reset delta2 so that this branch will *not* be taken on the
// next iteration:
delta2 = delta * 3;
Modified: sandbox/math_toolkit/boost/math/tools/series.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/tools/series.hpp (original)
+++ sandbox/math_toolkit/boost/math/tools/series.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -12,6 +12,7 @@
#include <boost/config/no_tr1/cmath.hpp>
#include <boost/cstdint.hpp>
+#include <boost/limits.hpp>
#include <boost/math/tools/config.hpp>
namespace boost{ namespace math{ namespace tools{
@@ -19,26 +20,8 @@
//
// Simple series summation come first:
//
-template <class Functor>
-typename Functor::result_type sum_series(Functor& func, int bits)
-{
- BOOST_MATH_STD_USING
-
- typedef typename Functor::result_type result_type;
-
- result_type factor = pow(result_type(2), bits);
- result_type result = func();
- result_type next_term;
- do{
- next_term = func();
- result += next_term;
- }
- while(fabs(result) < fabs(factor * next_term));
- return result;
-}
-
-template <class Functor>
-typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms)
+template <class Functor, class U, class V>
+inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms, const V& init_value)
{
BOOST_MATH_STD_USING
@@ -46,14 +29,13 @@
boost::uintmax_t counter = max_terms;
- result_type factor = ldexp(result_type(1), bits);
- result_type result = func();
+ result_type result = init_value;
result_type next_term;
do{
next_term = func();
result += next_term;
}
- while((fabs(result) < fabs(factor * next_term)) && --counter);
+ while((fabs(factor * result) < fabs(next_term)) && --counter);
// set max_terms to the actual number of terms of the series evaluated:
max_terms = max_terms - counter;
@@ -62,46 +44,46 @@
}
template <class Functor, class U>
-typename Functor::result_type sum_series(Functor& func, int bits, U init_value)
+inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms)
{
- BOOST_MATH_STD_USING
-
- typedef typename Functor::result_type result_type;
-
- result_type factor = ldexp(result_type(1), bits);
- result_type result = static_cast<result_type>(init_value);
- result_type next_term;
- do{
- next_term = func();
- result += next_term;
- }
- while(fabs(result) < fabs(factor * next_term));
-
- return result;
+ typename Functor::result_type init_value = 0;
+ return sum_series(func, factor, max_terms, init_value);
}
template <class Functor, class U>
-typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms, U init_value)
+inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms, const U& init_value)
{
BOOST_MATH_STD_USING
-
typedef typename Functor::result_type result_type;
+ result_type factor = ldexp(result_type(1), 1 - bits);
+ return sum_series(func, factor, max_terms, init_value);
+}
- boost::uintmax_t counter = max_terms;
-
- result_type factor = ldexp(result_type(1), bits);
- result_type result = init_value;
- result_type next_term;
- do{
- next_term = func();
- result += next_term;
- }
- while((fabs(result) < fabs(factor * next_term)) && --counter);
+template <class Functor>
+inline typename Functor::result_type sum_series(Functor& func, int bits)
+{
+ BOOST_MATH_STD_USING
+ typedef typename Functor::result_type result_type;
+ boost::uintmax_t iters = (std::numeric_limits<boost::uintmax_t>::max)();
+ result_type init_val = 0;
+ return sum_series(func, bits, iters, init_val);
+}
- // set max_terms to the actual number of terms of the series evaluated:
- max_terms = max_terms - counter;
+template <class Functor>
+inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms)
+{
+ BOOST_MATH_STD_USING
+ typedef typename Functor::result_type result_type;
+ result_type init_val = 0;
+ return sum_series(func, bits, max_terms, init_val);
+}
- return result;
+template <class Functor, class U>
+inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value)
+{
+ BOOST_MATH_STD_USING
+ boost::uintmax_t iters = (std::numeric_limits<boost::uintmax_t>::max)();
+ return sum_series(func, bits, iters, init_value);
}
//
@@ -117,7 +99,7 @@
// in any case the result is still much better than a naive summation.
//
template <class Functor>
-typename Functor::result_type kahan_sum_series(Functor& func, int bits)
+inline typename Functor::result_type kahan_sum_series(Functor& func, int bits)
{
BOOST_MATH_STD_USING
@@ -140,7 +122,7 @@
}
template <class Functor>
-typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::uintmax_t& max_terms)
+inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::uintmax_t& max_terms)
{
BOOST_MATH_STD_USING
Modified: sandbox/math_toolkit/libs/math/CMakeLists.txt
==============================================================================
--- sandbox/math_toolkit/libs/math/CMakeLists.txt (original)
+++ sandbox/math_toolkit/libs/math/CMakeLists.txt 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -1,3 +1,9 @@
+#
+# Copyright Troy D. Straszheim
+#
+# Distributed under the Boost Software License, Version 1.0.
+# See http://www.boost.org/LICENSE_1_0.txt
+#
#----------------------------------------------------------------------------
# This file was automatically generated from the original CMakeLists.txt file
# Add a variable to hold the headers for the library
Modified: sandbox/math_toolkit/libs/math/build/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/build/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/build/Jamfile.v2 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -4,6 +4,7 @@
# http://www.boost.org/LICENSE_1_0.txt.
import testing ;
+import pch ;
cpp-pch pch : ../src/tr1/pch.hpp : <include>../src/tr1 <link>shared:<define>BOOST_MATH_TR1_DYN_LINK=1 ;
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/building.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/building.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/building.qbk 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -5,7 +5,7 @@
The first thing you need to ask yourself is "Do I need to build anything at all?"
as the bulk of this library is header only: meaning you can use it just by
#including the necessary header(s). Refer to
-[link math_toolkit.special.extern_c C99 and C++ TR1 C-style Functions]
+[link math_toolkit.extern_c C99 and C++ TR1 C-style Functions]
for pros and cons of using
the TR1 components as opposed to the header only ones.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/concepts.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/concepts.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/concepts.qbk 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -238,8 +238,9 @@
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]:
-you will need change
+[@../../../../../boost/math/bindings/detail/big_lanczos.hpp
+boost/math/bindings/detail/big_lanczos.hpp]:
+in the former case 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)
and then specialise `lanczos_traits` for type T. Otherwise you may have to hack
@@ -420,3 +421,4 @@
+
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/acosh.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/acosh.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/asinh.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/asinh.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/atanh.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/atanh.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/beta.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/beta.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/beta_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/beta_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cauchy_pdf1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cauchy_pdf1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cauchy_pdf2.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cauchy_pdf2.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cbrt.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cbrt.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/chi_squared_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/chi_squared_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_i.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_i.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_j.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_j.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_k.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_bessel_k.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_neumann.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/cyl_neumann.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/digamma.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/digamma.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/dist_graphs.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -198,7 +198,8 @@
}
svg_2d_plot plot;
- plot.image_size(750, 400);
+ plot.image_x_size(750);
+ plot.image_y_size(400);
plot.coord_precision(4); // Avoids any visible steps.
plot.title_font_size(20);
plot.legend_title_font_size(15);
@@ -323,15 +324,15 @@
{
distribution_plotter<boost::math::gamma_distribution<> >
gamma_plotter;
- gamma_plotter.add(boost::math::gamma_distribution<>(1), "shape = 0.5");
- gamma_plotter.add(boost::math::gamma_distribution<>(2), "shape = 1");
- gamma_plotter.add(boost::math::gamma_distribution<>(4), "shape = 3");
+ gamma_plotter.add(boost::math::gamma_distribution<>(0.75), "shape = 0.75");
+ gamma_plotter.add(boost::math::gamma_distribution<>(1), "shape = 1");
+ gamma_plotter.add(boost::math::gamma_distribution<>(3), "shape = 3");
gamma_plotter.plot("Gamma Distribution PDF With Scale = 1", "gamma1_pdf.svg");
distribution_plotter<boost::math::gamma_distribution<> >
gamma_plotter2;
- gamma_plotter2.add(boost::math::gamma_distribution<>(2, 0.5), "scale = 2");
- gamma_plotter2.add(boost::math::gamma_distribution<>(2, 1), "scale = 0.5");
+ gamma_plotter2.add(boost::math::gamma_distribution<>(2, 0.5), "scale = 0.5");
+ gamma_plotter2.add(boost::math::gamma_distribution<>(2, 1), "scale = 1");
gamma_plotter2.add(boost::math::gamma_distribution<>(2, 2), "scale = 2");
gamma_plotter2.plot("Gamma Distribution PDF With Shape = 2", "gamma2_pdf.svg");
@@ -425,15 +426,15 @@
distribution_plotter<boost::math::exponential_distribution<> >
exponential_plotter;
- exponential_plotter.add(boost::math::exponential_distribution<>(0.5), "λ=1");
- exponential_plotter.add(boost::math::exponential_distribution<>(1), "λ=2");
- exponential_plotter.add(boost::math::exponential_distribution<>(2), "λ=5");
+ exponential_plotter.add(boost::math::exponential_distribution<>(0.5), "λ=0.5");
+ exponential_plotter.add(boost::math::exponential_distribution<>(1), "λ=1");
+ exponential_plotter.add(boost::math::exponential_distribution<>(2), "λ=2");
exponential_plotter.plot("Exponential Distribution PDF", "exponential_pdf.svg");
distribution_plotter<boost::math::extreme_value_distribution<> >
extreme_value_plotter;
- extreme_value_plotter.add(boost::math::extreme_value_distribution<>(-5), "location=1");
- extreme_value_plotter.add(boost::math::extreme_value_distribution<>(0), "location=2");
+ extreme_value_plotter.add(boost::math::extreme_value_distribution<>(-5), "location=-5");
+ extreme_value_plotter.add(boost::math::extreme_value_distribution<>(0), "location=0");
extreme_value_plotter.add(boost::math::extreme_value_distribution<>(5), "location=5");
extreme_value_plotter.plot("Extreme Value Distribution PDF (shape=1)", "extreme_value_pdf1.svg");
@@ -592,15 +593,15 @@
distribution_plotter<boost::math::negative_binomial_distribution<> >
negative_binomial_plotter2;
negative_binomial_plotter2.add(boost::math::negative_binomial_distribution<>(10, 0.5), "n=10 p=0.5");
- negative_binomial_plotter2.add(boost::math::negative_binomial_distribution<>(20, 0.5), "n=40 p=0.5");
+ negative_binomial_plotter2.add(boost::math::negative_binomial_distribution<>(20, 0.5), "n=20 p=0.5");
negative_binomial_plotter2.add(boost::math::negative_binomial_distribution<>(70, 0.5), "n=70 p=0.5");
negative_binomial_plotter2.plot("Negative Binomial Distribution PDF", "negative_binomial_pdf_2.svg");
distribution_plotter<boost::math::poisson_distribution<> >
poisson_plotter;
- poisson_plotter.add(boost::math::poisson_distribution<>(5), "λ=1");
+ poisson_plotter.add(boost::math::poisson_distribution<>(5), "λ=5");
poisson_plotter.add(boost::math::poisson_distribution<>(10), "λ=10");
- poisson_plotter.add(boost::math::poisson_distribution<>(20), "λ=50");
+ poisson_plotter.add(boost::math::poisson_distribution<>(20), "λ=20");
poisson_plotter.plot("Poisson Distribution PDF", "poisson_pdf_1.svg");
distribution_plotter<boost::math::hypergeometric_distribution<> >
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_2.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_2.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_3.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_3.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_carlson.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ellint_carlson.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erf_inv.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erf_inv.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erfc.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erfc.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erfc_inv.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/erfc_inv.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expint2.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expint2.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expint_i.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expint_i.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expm1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/expm1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/exponential_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/exponential_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/extreme_value_pdf1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/extreme_value_pdf1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/extreme_value_pdf2.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/extreme_value_pdf2.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/fisher_f_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/fisher_f_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma1_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma1_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma2_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma2_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma_p.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma_p.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma_q.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/gamma_q.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/hermite.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/hermite.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ibeta.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/ibeta.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/laguerre.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lgamma.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lgamma.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/log1p.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/log1p.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lognormal_pdf1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lognormal_pdf1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lognormal_pdf2.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/lognormal_pdf2.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_beta_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_beta_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_f_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_f_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_t_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nc_t_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nccs_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/nccs_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/normal_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/normal_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/pareto_pdf1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/pareto_pdf1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/pareto_pdf2.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/pareto_pdf2.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/powm1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/powm1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/rayleigh_cdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/rayleigh_cdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/rayleigh_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/rayleigh_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sf_graphs.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -121,7 +121,8 @@
};
svg_2d_plot plot;
- plot.image_size(600, 400);
+ plot.image_x_size(600);
+ plot.image_y_size(400);
plot.copyright_holder("John Maddock").copyright_date("2008").boost_license_on(true);
plot.coord_precision(4); // Could be 3 for smaller plots?
plot.title(title).title_font_size(20).title_on(true);
@@ -416,7 +417,7 @@
plot.clear();
plot.add(boost::bind(f3, 9, 1, _1), 0, 1, "a = 9, b = 1");
plot.add(boost::bind(f3, 7, 2, _1), 0, 1, "a = 7, b = 2");
- plot.add(boost::bind(f3, 5, 5, _1), 0, 1, "a = 1, b = 1");
+ plot.add(boost::bind(f3, 5, 5, _1), 0, 1, "a = 5, b = 5");
plot.add(boost::bind(f3, 2, 7, _1), 0, 1, "a = 2, b = 7");
plot.add(boost::bind(f3, 1, 9, _1), 0, 1, "a = 1, b = 9");
plot.plot("ibeta", "ibeta.svg", "z", "ibeta(a, b, z)");
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sinc_pi.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sinc_pi.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sinhc_pi.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sinhc_pi.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sph_bessel.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sph_bessel.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sph_neumann.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sph_neumann.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sqrt1pm1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/sqrt1pm1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/students_t_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/students_t_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/tgamma.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/tgamma.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/tgamma_delta_ratio.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/tgamma_delta_ratio.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/triangular_cdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/triangular_cdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/triangular_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/triangular_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/uniform_cdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/uniform_cdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/uniform_pdf.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/uniform_pdf.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/weibull_pdf1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/weibull_pdf1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/weibull_pdf2.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/weibull_pdf2.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/zeta1.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/zeta1.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/zeta2.png
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/graphs/zeta2.svg
==============================================================================
Binary files. No diff available.
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/ibeta.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/ibeta.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/ibeta.qbk 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -3,7 +3,7 @@
[h4 Synopsis]
``
-#include <boost/math/special_functions/gamma.hpp>
+#include <boost/math/special_functions/beta.hpp>
``
namespace boost{ namespace math{
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/igamma.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/igamma.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/igamma.qbk 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -251,14 +251,14 @@
4) [equation igamma8]
Or by subtraction of the upper integral from either [Gamma](a) or 1
-when /x > a and x > 1.1/.
+when /x - (1/(3x)) > a and x > 1.1/.
The upper integral is computed from Legendre's continued fraction representation:
5) [equation igamma9]
-When /x > 1.1/ or by subtraction of the lower integral from either [Gamma](a) or 1
-when /x < a/.
+When /(x > 1.1)/ or by subtraction of the lower integral from either [Gamma](a) or 1
+when /x - (1/(3x)) < a/.
For /x < 1.1/ computation of the upper integral is more complex as the continued
fraction representation is unstable in this area. However there is another
@@ -279,9 +279,9 @@
function in this region.
For /x < 1.1/ the crossover point where the result is ~0.5 no longer
-occurs for /x ~ y/. Using /x * 1.1 < a/ as the crossover criterion
+occurs for /x ~ y/. Using /x * 0.75 < a/ as the crossover criterion
for /0.5 < x <= 1.1/ keeps the maximum value computed (whether
-it's the upper or lower interval) to around 0.6. Likewise for
+it's the upper or lower interval) to around 0.75. Likewise for
/x <= 0.5/ then using /-0.4 / log(x) < a/ as the crossover criterion
keeps the maximum value computed to around 0.7
(whether it's the upper or lower interval).
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -185,11 +185,11 @@
[def __expint_n [link math_toolkit.special.expint.expint_n zeta]]
[/rounding]
-[def __round [link math_toolkit.special.rounding.round round]]
-[def __lround [link math_toolkit.special.rounding.round round]]
-[def __llround [link math_toolkit.special.rounding.round round]]
-[def __trunc [link math_toolkit.special.rounding.trunc trunc]]
-[def __modf [link math_toolkit.special.rounding.modf modf]]
+[def __round [link math_toolkit.utils.rounding.round round]]
+[def __lround [link math_toolkit.utils.rounding.round round]]
+[def __llround [link math_toolkit.utils.rounding.round round]]
+[def __trunc [link math_toolkit.utils.rounding.trunc trunc]]
+[def __modf [link math_toolkit.utils.rounding.modf modf]]
[/polynomials]
[def __laguerre [link math_toolkit.special.sf_poly.laguerre laguerre]]
@@ -407,9 +407,15 @@
[include powers.qbk]
[include sinc.qbk]
[include inv_hyper.qbk]
+
+[endsect] [/section:special Special Functions]
+
+[section:utils Floating Point Utilities]
[include rounding_func.qbk]
[include fpclassify.qbk]
+[include sign.qbk]
[include float_next.qbk]
+[endsect]
[section:extern_c TR1 and C99 external "C" Functions]
[section:tr1 C99 and TR1 C Functions Overview]
@@ -419,8 +425,6 @@
[include tr1_ref.qbk]
[endsect]
-[endsect] [/section:special Special Functions]
-
[section:toolkit Internal Details and Tools (Experimental)]
[include internals_overview.qbk]
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/roadmap.qbk 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -1,6 +1,6 @@
[template history[]
-[h4 Boost-1.39.0]
+[h4 Boost-1.40.0]
* Added support for MPFR as a bignum type.
* Added some full specializations of the policy classes to reduce compile times.
@@ -8,6 +8,9 @@
* Added Laplace distribution submitted by Thijs van den Berg.
* Updated performance test code to include new distributions, and improved the performance of the non-central distributions.
* Added SSE2 optimised __lanczos code, from Gautam Sewani's Google Summer of Code project.
+* Fixed bug in cyl_bessel_i that used an incorrect approximation for [nu] = 0.5, also effects the non-central
+ Chi Square Distribution when [nu] = 3, see bug report [@https://svn.boost.org/trac/boost/ticket/2877 #2877].
+* Fixed minor bugs [@https://svn.boost.org/trac/boost/ticket/2873 #2873].
[h4 Boost-1.38.0]
@@ -91,7 +94,7 @@
SVN Revisions:
-Sandbox and trunk last synchonised at revision: 51457.
+Sandbox and trunk last synchonised at revision: 51455.
]
[/
@@ -102,3 +105,4 @@
]
+
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/tr1.qbk 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -99,7 +99,7 @@
[h4 Supported C99 Functions]
-See also the [link math_toolkit.special.extern_c.c99
+See also the [link math_toolkit.extern_c.c99
quick reference guide for these functions].
namespace boost{ namespace math{ namespace tr1{ extern "C"{
@@ -191,7 +191,7 @@
[h4 Supported TR1 Functions]
-See also the [link math_toolkit.special.extern_c.tr1
+See also the [link math_toolkit.extern_c.tr1
quick reference guide for these functions].
namespace boost{ namespace math{ namespace tr1{ extern "C"{
Modified: sandbox/math_toolkit/libs/math/example/error_policies_example.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/error_policies_example.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/error_policies_example.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -73,12 +73,14 @@
cout << "quantile(my_students_t(), 0.); = " << quantile(my_students_t(-1), 0.F) << endl; // 'bad' argument negative, so expect NaN.
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
// Construct a (0, 1) normal distribution that ignores all errors,
// returning NaN, infinity, zero, or best guess,
// and NOT setting errno.
normal_distribution<long double, my_ignoreall_policy> my_normal2(0.L, 1.L); // explicit parameters for distribution.
cout << "quantile(my_normal2(), 0.); = " << quantile(my_normal2, 0.01) << endl; // argument 0.01, so result finite.
cout << "quantile(my_normal2(), 0.); = " << quantile(my_normal2, 0.) << endl; // argument zero, so expect infinity.
+#endif
return 0;
}
Modified: sandbox/math_toolkit/libs/math/example/neg_binom_confidence_limits.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/neg_binom_confidence_limits.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/neg_binom_confidence_limits.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -176,4 +176,5 @@
99.900 0.07921 0.12336
99.990 0.07577 0.12795
99.999 0.07282 0.13206
-*/
\ No newline at end of file
+*/
+
Modified: sandbox/math_toolkit/libs/math/example/policy_eg_1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/example/policy_eg_1.cpp (original)
+++ sandbox/math_toolkit/libs/math/example/policy_eg_1.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -32,4 +32,5 @@
std::cout << "errno = " << errno << std::endl;
}
-//]
\ No newline at end of file
+//]
+
Modified: sandbox/math_toolkit/libs/math/minimax/f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/minimax/f.cpp (original)
+++ sandbox/math_toolkit/libs/math/minimax/f.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -4,8 +4,8 @@
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#define L22
-#include "../tools/ntl_rr_lanczos.hpp"
-#include "../tools/ntl_rr_digamma.hpp"
+//#include "../tools/ntl_rr_lanczos.hpp"
+//#include "../tools/ntl_rr_digamma.hpp"
#include <boost/math/bindings/rr.hpp>
#include <boost/math/tools/polynomial.hpp>
#include <boost/math/special_functions.hpp>
Modified: sandbox/math_toolkit/libs/math/minimax/main.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/minimax/main.cpp (original)
+++ sandbox/math_toolkit/libs/math/minimax/main.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -409,11 +409,11 @@
std::string msg = "Max Error found at ";
msg += name;
msg += " precision = ";
- msg.append(62 - 17 - msg.size(), ' ');
+ //msg.append(62 - 17 - msg.size(), ' ');
std::cout << msg << "Poly: " << std::setprecision(6)
- << std::setw(15) << std::left
+ //<< std::setw(15) << std::left
<< boost::math::tools::real_cast<T>(max_error)
- << "Cheb: " << boost::math::tools::real_cast<T>(max_cheb_error) << std::endl;
+ << " Cheb: " << boost::math::tools::real_cast<T>(max_cheb_error) << std::endl;
}
else
{
Modified: sandbox/math_toolkit/libs/math/performance/distributions.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/performance/distributions.cpp (original)
+++ sandbox/math_toolkit/libs/math/performance/distributions.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -651,3 +651,290 @@
#endif
+#ifdef TEST_DCDFLIB
+#include <dcdflib.h>
+
+void cdfbeta( int *which, double *p, double *q, double *x, double *a, double *b, int *status, double *bound)
+{
+ double y = 1 - *x;
+ cdfbet(which, p, q, x, &y, a, b, status, bound);
+}
+
+void cdfbinomial( int *which, double *p, double *q, double *x, double *a, double *b, int *status, double *bound)
+{
+ double y = 1 - *x;
+ double cb = 1 - *b;
+ cdfbet(which, p, q, x, a, b, &cb, status, bound);
+}
+
+void cdfnegative_binomial( int *which, double *p, double *q, double *x, double *a, double *b, int *status, double *bound)
+{
+ double y = 1 - *x;
+ double cb = 1 - *b;
+ cdfnbn(which, p, q, x, a, b, &cb, status, bound);
+}
+
+void cdfchi_squared( int *which, double *p, double *q, double *x, double *a, int *status, double *bound)
+{
+ cdfchi(which, p, q, x, a, status, bound);
+}
+
+void cdfnon_central_chi_squared( int *which, double *p, double *q, double *x, double *a, double *b, int *status, double *bound)
+{
+ cdfchn(which, p, q, x, a, b, status, bound);
+}
+
+namespace boost{ namespace math{
+
+ template <class T = double> struct f_distribution : public fisher_f_distribution<T>
+ { f_distribution(T a, T b) : fisher_f_distribution(a, b) {} };
+ template <class T = double>
+ struct fnc_distribution : public non_central_f_distribution<T>
+ { fnc_distribution(T a, T b, T c) : non_central_f_distribution(a, b, c) {} };
+ template <class T = double> struct gam_distribution : public gamma_distribution<T>
+ { gam_distribution(T a, T b) : gamma_distribution(a, b) {} };
+ template <class T = double> struct nor_distribution : public normal_distribution<T>
+ { nor_distribution(T a, T b) : normal_distribution(a, b) {} };
+ template <class T = double> struct poi_distribution : public poisson_distribution<T>
+ { poi_distribution(T a) : poisson_distribution(a) {} };
+ template <class T = double> struct t_distribution : public students_t_distribution<T>
+ { t_distribution(T a) : students_t_distribution(a) {} };
+
+ template <class T>
+ T cdf(const f_distribution<T>& d, const T& r){ return cdf(static_cast<fisher_f_distribution<T> >(d), r); }
+ template <class T>
+ T quantile(const f_distribution<T>& d, const T& r){ return quantile(static_cast<fisher_f_distribution<T> >(d), r); }
+ template <class T>
+ T cdf(const fnc_distribution<T>& d, const T& r){ return cdf(static_cast<non_central_f_distribution<T> >(d), r); }
+ template <class T>
+ T quantile(const fnc_distribution<T>& d, const T& r){ return quantile(static_cast<non_central_f_distribution<T> >(d), r); }
+ template <class T>
+ T cdf(const gam_distribution<T>& d, const T& r){ return cdf(static_cast<gamma_distribution<T> >(d), r); }
+ template <class T>
+ T quantile(const gam_distribution<T>& d, const T& r){ return quantile(static_cast<gamma_distribution<T> >(d), r); }
+ template <class T>
+ T cdf(const nor_distribution<T>& d, const T& r){ return cdf(static_cast<normal_distribution<T> >(d), r); }
+ template <class T>
+ T quantile(const nor_distribution<T>& d, const T& r){ return quantile(static_cast<normal_distribution<T> >(d), r); }
+ template <class T>
+ T cdf(const poi_distribution<T>& d, const T& r){ return cdf(static_cast<poisson_distribution<T> >(d), r); }
+ template <class T>
+ T quantile(const poi_distribution<T>& d, const T& r){ return quantile(static_cast<poisson_distribution<T> >(d), r); }
+ template <class T>
+ T cdf(const t_distribution<T>& d, const T& r){ return cdf(static_cast<students_t_distribution<T> >(d), r); }
+ template <class T>
+ T quantile(const t_distribution<T>& d, const T& r){ return quantile(static_cast<students_t_distribution<T> >(d), r); }
+
+}}
+
+bool check_near(double a, double b)
+{
+ bool r = ((fabs(a) <= 1e-7) || (fabs(b) <= 1e-7)) ? (fabs(a-b) < 1e-7) : fabs((a - b) / a) < 1e-5;
+ return r;
+}
+
+#define BOOST_MATH_DCD_DISTRIBUTION3_TEST(name, param1_table, param2_table, param3_table, random_variable_table, probability_table) \
+ BOOST_MATH_PERFORMANCE_TEST(BOOST_JOIN(dcd_dist, name), "dist-" BOOST_STRINGIZE(name) "-dcd-cdf")\
+ {\
+ double result = 0;\
+ unsigned a_size = sizeof(param1_table)/sizeof(param1_table[0]);\
+ unsigned b_size = sizeof(param2_table)/sizeof(param2_table[0]);\
+ unsigned c_size = sizeof(param3_table)/sizeof(param3_table[0]);\
+ unsigned d_size = sizeof(random_variable_table)/sizeof(random_variable_table[0]);\
+ \
+ for(unsigned i = 0; i < a_size; ++i)\
+ {\
+ for(unsigned j = 0; j < b_size; ++j)\
+ {\
+ for(unsigned k = 0; k < c_size; ++k)\
+ {\
+ for(unsigned l = 0; l < d_size; ++l)\
+ {\
+ int which = 1;\
+ double p; double q; \
+ double rv = random_variable_table[l];\
+ double a = param1_table[i];\
+ double b = param2_table[j];\
+ double c = param3_table[k];\
+ int status = 0;\
+ double bound = 0;\
+ BOOST_JOIN(cdf, name)(&which, &p, &q, &rv, &a, &b, &c, &status, &bound);\
+ result += p;\
+ BOOST_ASSERT(\
+ (status != 0) || check_near(p, \
+ cdf(boost::math:: BOOST_JOIN(name, _distribution) <>(param1_table[i], param2_table[j], param3_table[k]), random_variable_table[l])\
+ ));\
+ }\
+ }\
+ }\
+ }\
+ \
+ consume_result(result);\
+ set_call_count(a_size * b_size * c_size * d_size);\
+ }\
+ BOOST_MATH_PERFORMANCE_TEST(BOOST_JOIN(dcd_dist_quant, name), "dist-" BOOST_STRINGIZE(name) "-dcd-quantile")\
+ {\
+ double result = 0;\
+ unsigned a_size = sizeof(param1_table)/sizeof(param1_table[0]);\
+ unsigned b_size = sizeof(param2_table)/sizeof(param2_table[0]);\
+ unsigned c_size = sizeof(param3_table)/sizeof(param3_table[0]);\
+ unsigned d_size = sizeof(probability_table)/sizeof(probability_table[0]);\
+ \
+ for(unsigned i = 0; i < a_size; ++i)\
+ {\
+ for(unsigned j = 0; j < b_size; ++j)\
+ {\
+ for(unsigned k = 0; k < c_size; ++k)\
+ {\
+ for(unsigned l = 0; l < d_size; ++l)\
+ {\
+ int which = 2;\
+ double p = probability_table[l];\
+ double q = 1 - p; \
+ double rv;\
+ double a = param1_table[i];\
+ double b = param2_table[j];\
+ double c = param3_table[k];\
+ int status = 0;\
+ double bound = 0;\
+ BOOST_JOIN(cdf, name)(&which, &p, &q, &rv, &a, &b, &c, &status, &bound);\
+ result += rv;\
+ BOOST_ASSERT((status != 0) || (p > 0.99) || check_near(rv, quantile(boost::math:: BOOST_JOIN(name, _distribution) <>(param1_table[i], param2_table[j], param3_table[k]), probability_table[l])));\
+ }\
+ }\
+ }\
+ }\
+ \
+ consume_result(result);\
+ set_call_count(a_size * b_size * c_size * d_size);\
+ }
+
+#define BOOST_MATH_DCD_DISTRIBUTION2_TEST(name, param1_table, param2_table, random_variable_table, probability_table) \
+ BOOST_MATH_PERFORMANCE_TEST(BOOST_JOIN(dcd_dist, name), "dist-" BOOST_STRINGIZE(name) "-dcd-cdf")\
+ {\
+ double result = 0;\
+ unsigned a_size = sizeof(param1_table)/sizeof(param1_table[0]);\
+ unsigned b_size = sizeof(param2_table)/sizeof(param2_table[0]);\
+ unsigned c_size = sizeof(random_variable_table)/sizeof(random_variable_table[0]);\
+ \
+ for(unsigned i = 0; i < a_size; ++i)\
+ {\
+ for(unsigned j = 0; j < b_size; ++j)\
+ {\
+ for(unsigned k = 0; k < c_size; ++k)\
+ {\
+ int which = 1;\
+ double p; double q; \
+ double rv = random_variable_table[k];\
+ double a = param1_table[i];\
+ double b = param2_table[j];\
+ int status = 0;\
+ double bound = 0;\
+ BOOST_JOIN(cdf, name)(&which, &p, &q, &rv, &a, &b, &status, &bound);\
+ result += p;\
+ BOOST_ASSERT((status != 0) || check_near(p, cdf(boost::math:: BOOST_JOIN(name, _distribution) <>(param1_table[i], param2_table[j]), random_variable_table[k])));\
+ }\
+ }\
+ }\
+ \
+ consume_result(result);\
+ set_call_count(a_size * b_size * c_size);\
+ }\
+ BOOST_MATH_PERFORMANCE_TEST(BOOST_JOIN(dcd_dist_quant, name), "dist-" BOOST_STRINGIZE(name) "-dcd-quantile")\
+ {\
+ double result = 0;\
+ unsigned a_size = sizeof(param1_table)/sizeof(param1_table[0]);\
+ unsigned b_size = sizeof(param2_table)/sizeof(param2_table[0]);\
+ unsigned c_size = sizeof(probability_table)/sizeof(probability_table[0]);\
+ \
+ for(unsigned i = 0; i < a_size; ++i)\
+ {\
+ for(unsigned j = 0; j < b_size; ++j)\
+ {\
+ for(unsigned k = 0; k < c_size; ++k)\
+ {\
+ int which = 2;\
+ double p = probability_table[k];\
+ double q = 1 - p; \
+ double rv;\
+ double a = param1_table[i];\
+ double b = param2_table[j];\
+ int status = 0;\
+ double bound = 0;\
+ BOOST_JOIN(cdf, name)(&which, &p, &q, &rv, &a, &b, &status, &bound);\
+ result += rv;\
+ BOOST_ASSERT((status != 0) || (p > 0.99) || check_near(rv, quantile(boost::math:: BOOST_JOIN(name, _distribution) <>(param1_table[i], param2_table[j]), probability_table[k])));\
+ }\
+ }\
+ }\
+ \
+ consume_result(result);\
+ set_call_count(a_size * b_size * c_size);\
+ }
+
+#define BOOST_MATH_DCD_DISTRIBUTION1_TEST(name, param1_table, random_variable_table, probability_table) \
+ BOOST_MATH_PERFORMANCE_TEST(BOOST_JOIN(dcd_dist, name), "dist-" BOOST_STRINGIZE(name) "-dcd-cdf")\
+ {\
+ double result = 0;\
+ unsigned a_size = sizeof(param1_table)/sizeof(param1_table[0]);\
+ unsigned c_size = sizeof(random_variable_table)/sizeof(random_variable_table[0]);\
+ \
+ for(unsigned i = 0; i < a_size; ++i)\
+ {\
+ for(unsigned k = 0; k < c_size; ++k)\
+ {\
+ int which = 1;\
+ double p; double q; \
+ double rv = random_variable_table[k];\
+ double a = param1_table[i];\
+ int status = 0;\
+ double bound = 0;\
+ BOOST_JOIN(cdf, name)(&which, &p, &q, &rv, &a, &status, &bound);\
+ result += p;\
+ BOOST_ASSERT((status != 0) || check_near(p, cdf(boost::math:: BOOST_JOIN(name, _distribution) <>(param1_table[i]), random_variable_table[k])));\
+ }\
+ }\
+ \
+ consume_result(result);\
+ set_call_count(a_size * c_size);\
+ }\
+ BOOST_MATH_PERFORMANCE_TEST(BOOST_JOIN(dcd_dist_quant, name), "dist-" BOOST_STRINGIZE(name) "-dcd-quantile")\
+ {\
+ double result = 0;\
+ unsigned a_size = sizeof(param1_table)/sizeof(param1_table[0]);\
+ unsigned c_size = sizeof(probability_table)/sizeof(probability_table[0]);\
+ \
+ for(unsigned i = 0; i < a_size; ++i)\
+ {\
+ for(unsigned k = 0; k < c_size; ++k)\
+ {\
+ int which = 2;\
+ double p = probability_table[k];\
+ double q = 1 - p; \
+ double rv;\
+ double a = param1_table[i];\
+ int status = 0;\
+ double bound = 0;\
+ BOOST_JOIN(cdf, name)(&which, &p, &q, &rv, &a, &status, &bound);\
+ result += rv;\
+ BOOST_ASSERT((status != 0) || (p > 0.99) || check_near(rv, quantile(boost::math:: BOOST_JOIN(name, _distribution) <>(param1_table[i]), probability_table[k])));\
+ }\
+ }\
+ \
+ consume_result(result);\
+ set_call_count(a_size * c_size);\
+ }
+
+BOOST_MATH_DCD_DISTRIBUTION2_TEST(beta, probabilities, probabilities, probabilities, probabilities) // ??
+BOOST_MATH_DCD_DISTRIBUTION2_TEST(binomial, int_values, probabilities, int_values, probabilities) // OK ish
+BOOST_MATH_DCD_DISTRIBUTION1_TEST(chi_squared, int_values, real_values, probabilities) // OK
+BOOST_MATH_DCD_DISTRIBUTION2_TEST(non_central_chi_squared, int_values, int_values, real_values, probabilities) // Error rates quite high for DCD version?
+BOOST_MATH_DCD_DISTRIBUTION2_TEST(f, int_values, int_values, real_values, probabilities) // OK
+BOOST_MATH_DCD_DISTRIBUTION3_TEST(fnc, int_values, int_values, real_values, real_values, probabilities) // Error rates quite high for DCD version?
+BOOST_MATH_DCD_DISTRIBUTION2_TEST(gam, real_values, real_values, real_values, probabilities) // ??
+BOOST_MATH_DCD_DISTRIBUTION2_TEST(negative_binomial, int_values, probabilities, int_values, probabilities) // OK
+BOOST_MATH_DCD_DISTRIBUTION2_TEST(nor, real_values, real_values, real_values, probabilities) // OK
+BOOST_MATH_DCD_DISTRIBUTION1_TEST(poi, real_values, int_values, probabilities) // OK
+BOOST_MATH_DCD_DISTRIBUTION1_TEST(t, int_values, real_values, probabilities) // OK
+
+#endif
Modified: sandbox/math_toolkit/libs/math/performance/test_erf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/performance/test_erf.cpp (original)
+++ sandbox/math_toolkit/libs/math/performance/test_erf.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -107,3 +107,30 @@
#endif
+#ifdef TEST_DCDFLIB
+#include <dcdflib.h>
+
+template <std::size_t N>
+double erf_evaluate2_dcd(const boost::array<boost::array<T, 3>, N>& data)
+{
+ double result = 0;
+ for(unsigned i = 0; i < N; ++i)
+ {
+ double x = data[i][0];
+ result += error_f(&x);
+ }
+ return result;
+}
+
+BOOST_MATH_PERFORMANCE_TEST(erf_test_dcd, "erf-dcd")
+{
+ double result = erf_evaluate2_dcd(erf_data);
+ result += erf_evaluate2_dcd(erf_large_data);
+ result += erf_evaluate2_dcd(erf_small_data);
+
+ consume_result(result);
+ set_call_count((sizeof(erf_data) + sizeof(erf_large_data) + sizeof(erf_small_data)) / sizeof(erf_data[0]));
+}
+
+#endif
+
Modified: sandbox/math_toolkit/libs/math/performance/test_gamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/performance/test_gamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/performance/test_gamma.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -198,3 +198,69 @@
#endif
+#ifdef TEST_DCDFLIB
+#include <dcdflib.h>
+
+template <std::size_t N>
+double gamma_evaluate2_dcd(const boost::array<boost::array<T, 3>, N>& data)
+{
+ double result = 0;
+ for(unsigned i = 0; i < N; ++i)
+ {
+ double x = data[i][0];
+ result += gamma_x(&x);
+ }
+ return result;
+}
+
+BOOST_MATH_PERFORMANCE_TEST(gamma_test_dcd, "gamma-dcd")
+{
+ double result = gamma_evaluate2_dcd(factorials);
+ result += gamma_evaluate2_dcd(near_1);
+ result += gamma_evaluate2_dcd(near_2);
+ result += gamma_evaluate2_dcd(near_0);
+ result += gamma_evaluate2_dcd(near_m10);
+ result += gamma_evaluate2_dcd(near_m55);
+
+ consume_result(result);
+ set_call_count(
+ (sizeof(factorials)
+ + sizeof(near_1)
+ + sizeof(near_2)
+ + sizeof(near_0)
+ + sizeof(near_m10)
+ + sizeof(near_m55)) / sizeof(factorials[0]));
+}
+
+template <std::size_t N>
+double lgamma_evaluate2_dcd(const boost::array<boost::array<T, 3>, N>& data)
+{
+ double result = 0;
+ for(unsigned i = 0; i < N; ++i)
+ {
+ double x = data[i][0];
+ result += gamma_log(&x);
+ }
+ return result;
+}
+
+BOOST_MATH_PERFORMANCE_TEST(lgamma_test_dcd, "lgamma-dcd")
+{
+ double result = lgamma_evaluate2_dcd(factorials);
+ result += lgamma_evaluate2_dcd(near_1);
+ result += lgamma_evaluate2_dcd(near_2);
+ result += lgamma_evaluate2_dcd(near_0);
+ result += lgamma_evaluate2_dcd(near_m10);
+ result += lgamma_evaluate2_dcd(near_m55);
+
+ consume_result(result);
+ set_call_count(
+ (sizeof(factorials)
+ + sizeof(near_1)
+ + sizeof(near_2)
+ + sizeof(near_0)
+ + sizeof(near_m10)
+ + sizeof(near_m55)) / sizeof(factorials[0]));
+}
+
+#endif
\ No newline at end of file
Modified: sandbox/math_toolkit/libs/math/performance/test_ibeta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/performance/test_ibeta.cpp (original)
+++ sandbox/math_toolkit/libs/math/performance/test_ibeta.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -189,3 +189,40 @@
#endif
+#ifdef TEST_DCDFLIB
+#include <dcdflib.h>
+
+template <std::size_t N>
+double ibeta_evaluate2_dcd(const boost::array<boost::array<T, 7>, N>& data)
+{
+ double result = 0;
+ for(unsigned i = 0; i < N; ++i)
+ {
+ double a = data[i][0];
+ double b = data[i][1];
+ double x = data[i][2];
+ double y = 1 - x;
+ double w, w1;
+ int ierr;
+ beta_inc (&a, &b, &x, &y, &w, &w1, &ierr);
+ result += w;
+ }
+ return result;
+}
+
+BOOST_MATH_PERFORMANCE_TEST(ibeta_test_dcd, "ibeta-dcd")
+{
+ double result = ibeta_evaluate2_dcd(ibeta_data);
+ result += ibeta_evaluate2_dcd(ibeta_int_data);
+ result += ibeta_evaluate2_dcd(ibeta_large_data);
+ result += ibeta_evaluate2_dcd(ibeta_small_data);
+
+ consume_result(result);
+ set_call_count(
+ (sizeof(ibeta_data)
+ + sizeof(ibeta_int_data)
+ + sizeof(ibeta_large_data)
+ + sizeof(ibeta_small_data)) / sizeof(ibeta_data[0]));
+}
+
+#endif
\ No newline at end of file
Modified: sandbox/math_toolkit/libs/math/performance/test_igamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/performance/test_igamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/performance/test_igamma.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -188,3 +188,102 @@
}
#endif
+
+#ifdef TEST_DCDFLIB
+#include <dcdflib.h>
+namespace dcd{
+
+inline double gamma_q(double x, double y)
+{
+ double ans, qans;
+ int i = 0;
+ gamma_inc (&x, &y, &ans, &qans, &i);
+ return qans;
+}
+
+inline double gamma_p(double x, double y)
+{
+ double ans, qans;
+ int i = 0;
+ gamma_inc (&x, &y, &ans, &qans, &i);
+ return ans;
+}
+
+inline double gamma_q_inv(double x, double y)
+{
+ double ans, p, nul;
+ int i = 0;
+ p = 1 - y;
+ nul = 0;
+ gamma_inc_inv (&x, &ans, &nul, &p, &y, &i);
+ return ans;
+}
+
+inline double gamma_p_inv(double x, double y)
+{
+ double ans, p, nul;
+ int i = 0;
+ p = 1 - y;
+ nul = 0;
+ gamma_inc_inv (&x, &ans, &nul, &y, &p, &i);
+ return ans;
+}
+
+}
+
+template <std::size_t N>
+double igamma_evaluate2_dcd(const boost::array<boost::array<T, 6>, N>& data)
+{
+ double result = 0;
+ for(unsigned i = 0; i < N; ++i)
+ {
+ result += dcd::gamma_p(data[i][0], data[i][1]);
+ result += dcd::gamma_q(data[i][0], data[i][1]);
+ }
+ return result;
+}
+
+BOOST_MATH_PERFORMANCE_TEST(igamma_test, "igamma-dcd")
+{
+ double result = igamma_evaluate2_dcd(igamma_big_data);
+ result += igamma_evaluate2_dcd(igamma_int_data);
+ result += igamma_evaluate2_dcd(igamma_med_data);
+ result += igamma_evaluate2_dcd(igamma_small_data);
+
+ consume_result(result);
+ set_call_count(
+ 2 * (sizeof(igamma_big_data)
+ + sizeof(igamma_int_data)
+ + sizeof(igamma_med_data)
+ + sizeof(igamma_small_data)) / sizeof(igamma_big_data[0]));
+}
+
+template <std::size_t N>
+double igamma_inv_evaluate2_dcd(const boost::array<boost::array<T, 6>, N>& data)
+{
+ double result = 0;
+ for(unsigned i = 0; i < N; ++i)
+ {
+ result += dcd::gamma_p_inv(data[i][0], data[i][5]);
+ result += dcd::gamma_q_inv(data[i][0], data[i][3]);
+ }
+ return result;
+}
+
+BOOST_MATH_PERFORMANCE_TEST(igamma_inv_test, "igamma_inv-dcd")
+{
+ double result = igamma_inv_evaluate2_dcd(igamma_big_data);
+ result += igamma_inv_evaluate2_dcd(igamma_int_data);
+ result += igamma_inv_evaluate2_dcd(igamma_med_data);
+ result += igamma_inv_evaluate2_dcd(igamma_small_data);
+
+ consume_result(result);
+ set_call_count(
+ 2 * (sizeof(igamma_big_data)
+ + sizeof(igamma_int_data)
+ + sizeof(igamma_med_data)
+ + sizeof(igamma_small_data)) / sizeof(igamma_big_data[0]));
+}
+
+#endif
+
Modified: sandbox/math_toolkit/libs/math/project-root.jam
==============================================================================
--- sandbox/math_toolkit/libs/math/project-root.jam (original)
+++ sandbox/math_toolkit/libs/math/project-root.jam 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -10,6 +10,8 @@
## IMPORTANT NOTE: This file MUST NOT be copied over a boost installation
##
+ECHO test ;
+
path-constant top : . ;
import modules ;
@@ -60,3 +62,5 @@
+
+
Modified: sandbox/math_toolkit/libs/math/test/CMakeLists.txt
==============================================================================
--- sandbox/math_toolkit/libs/math/test/CMakeLists.txt (original)
+++ sandbox/math_toolkit/libs/math/test/CMakeLists.txt 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -1,3 +1,9 @@
+#
+# Copyright Troy D. Straszheim
+#
+# Distributed under the Boost Software License, Version 1.0.
+# See http://www.boost.org/LICENSE_1_0.txt
+#
boost_additional_test_dependencies(math BOOST_DEPENDS test regex)
boost_test_run(common_factor_test DEPENDS boost_unit_test_framework)
Modified: sandbox/math_toolkit/libs/math/test/Jamfile.v2
==============================================================================
--- sandbox/math_toolkit/libs/math/test/Jamfile.v2 (original)
+++ sandbox/math_toolkit/libs/math/test/Jamfile.v2 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -9,6 +9,7 @@
import testing ;
import modules ;
import path ;
+import pch ;
local ntl-path = [ modules.peek : NTL_PATH ] ;
local gmp_path = [ modules.peek : GMP_PATH ] ;
@@ -20,6 +21,8 @@
<toolset>acc:<cxxflags>+W2068,2461,2236,4070,4069
<toolset>intel:<cxxflags>-nologo
<toolset>intel:<linkflags>-nologo
+ #<toolset>intel-linux:<pch>off
+ <toolset>intel-darwin:<pch>off
<toolset>msvc:<warnings>all
<toolset>msvc:<asynch-exceptions>on
<toolset>msvc:<cxxflags>/wd4996
@@ -29,12 +32,13 @@
<toolset>msvc:<cxxflags>/wd4127
<toolset>msvc:<cxxflags>/wd4701 # needed for lexical cast - temporary.
<toolset>msvc-7.1:<source>../vc71_fix//vc_fix
+ <toolset>msvc-7.1:<pch>off
<toolset>borland:<link>static
<toolset>borland:<runtime-link>static
# <toolset>msvc:<cxxflags>/wd4506 has no effect?
# suppress xstring(237) : warning C4506: no definition for inline function
<include>../../..
- <source>/boost/regex//boost_regex
+ <source>../../regex/build//boost_regex
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
# Sunpro has problems building regex as a shared lib:
<toolset>sun:<link>static
@@ -45,43 +49,43 @@
<include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx
;
-cpp-pch pch : pch.hpp ;
+cpp-pch pch : pch.hpp : <use>../../test/build//boost_test_exec_monitor ;
-run hypot_test.cpp pch ;
-run pow_test.cpp ;
-run log1p_expm1_test.cpp pch ;
-run powm1_sqrtp1m1_test.cpp pch ;
-run special_functions_test.cpp /boost/unit_test//boost_unit_test_framework/<link>static ;
-run test_bernoulli.cpp ;
-run test_constants.cpp pch ;
-run test_bessel_j.cpp pch ;
-run test_bessel_y.cpp pch ;
-run test_bessel_i.cpp pch ;
-run test_bessel_k.cpp pch ;
-run test_beta.cpp pch ;
-run test_beta_dist.cpp ;
-run test_binomial.cpp
+run hypot_test.cpp pch ../../test/build//boost_test_exec_monitor ;
+run pow_test.cpp ../../test/build//boost_test_exec_monitor ;
+run log1p_expm1_test.cpp pch ../../test/build//boost_test_exec_monitor ;
+run powm1_sqrtp1m1_test.cpp pch ../../test/build//boost_test_exec_monitor ;
+run special_functions_test.cpp ../../test/build//boost_unit_test_framework/<link>static ;
+run test_bernoulli.cpp ../../test/build//boost_test_exec_monitor ;
+run test_constants.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_bessel_j.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_bessel_y.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_bessel_i.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_bessel_k.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_beta.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_beta_dist.cpp ../../test/build//boost_test_exec_monitor ;
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_binomial_float ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_binomial_double ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_binomial_long_double ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -89,7 +93,7 @@
<define>TEST_ROUNDING=0
<toolset>intel:<pch>off
: test_binomial_real_concept0 ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -97,7 +101,7 @@
<define>TEST_ROUNDING=1
<toolset>intel:<pch>off
: test_binomial_real_concept1 ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -105,7 +109,7 @@
<define>TEST_ROUNDING=2
<toolset>intel:<pch>off
: test_binomial_real_concept2 ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -113,7 +117,7 @@
<define>TEST_ROUNDING=3
<toolset>intel:<pch>off
: test_binomial_real_concept3 ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -121,7 +125,7 @@
<define>TEST_ROUNDING=4
<toolset>intel:<pch>off
: test_binomial_real_concept4 ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -129,7 +133,7 @@
<define>TEST_ROUNDING=5
<toolset>intel:<pch>off
: test_binomial_real_concept5 ;
-run test_binomial.cpp
+run test_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -137,93 +141,93 @@
<define>TEST_ROUNDING=6
<toolset>intel:<pch>off
: test_binomial_real_concept6 ;
-run test_binomial_coeff.cpp pch ;
-run test_carlson.cpp pch ;
-run test_cauchy.cpp ;
-run test_cbrt.cpp pch ;
-run test_chi_squared.cpp ;
-run test_classify.cpp pch ;
-run test_digamma.cpp pch ;
-run test_dist_overloads.cpp ;
-run test_ellint_1.cpp pch ;
-run test_ellint_2.cpp pch ;
-run test_ellint_3.cpp pch ;
-run test_erf.cpp pch ;
-run test_error_handling.cpp ;
-run test_expint.cpp pch ;
-run test_exponential_dist.cpp ;
-run test_extreme_value.cpp ;
-run test_factorials.cpp pch ;
-run test_find_location.cpp pch ;
-run test_find_scale.cpp pch ;
-run test_fisher_f.cpp ;
-run test_gamma.cpp pch ;
-run test_gamma_dist.cpp pch ;
-run test_hermite.cpp pch ;
-run test_hypergeometric_dist.cpp
+run test_binomial_coeff.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_carlson.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_cauchy.cpp ../../test/build//boost_test_exec_monitor ;
+run test_cbrt.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_chi_squared.cpp ../../test/build//boost_test_exec_monitor ;
+run test_classify.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_digamma.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_dist_overloads.cpp ../../test/build//boost_test_exec_monitor ;
+run test_ellint_1.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_ellint_2.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_ellint_3.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_erf.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_error_handling.cpp ../../test/build//boost_test_exec_monitor ;
+run test_expint.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_exponential_dist.cpp ../../test/build//boost_test_exec_monitor ;
+run test_extreme_value.cpp ../../test/build//boost_test_exec_monitor ;
+run test_factorials.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_find_location.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_find_scale.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_fisher_f.cpp ../../test/build//boost_test_exec_monitor ;
+run test_gamma.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_gamma_dist.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_hermite.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_hypergeometric_dist.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_QUANT=0
<toolset>intel:<pch>off
: test_hypergeometric_dist0 ;
-run test_hypergeometric_dist.cpp
+run test_hypergeometric_dist.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_QUANT=1
<toolset>intel:<pch>off
: test_hypergeometric_dist1 ;
-run test_hypergeometric_dist.cpp
+run test_hypergeometric_dist.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_QUANT=2
<toolset>intel:<pch>off
: test_hypergeometric_dist2 ;
-run test_hypergeometric_dist.cpp
+run test_hypergeometric_dist.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_QUANT=3
<toolset>intel:<pch>off
: test_hypergeometric_dist3 ;
-run test_hypergeometric_dist.cpp
+run test_hypergeometric_dist.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_QUANT=4
<toolset>intel:<pch>off
: test_hypergeometric_dist4 ;
-run test_hypergeometric_dist.cpp
+run test_hypergeometric_dist.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_QUANT=5
<toolset>intel:<pch>off
: test_hypergeometric_dist5 ;
-run test_ibeta.cpp pch
+run test_ibeta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_ibeta_float ;
-run test_ibeta.cpp pch
+run test_ibeta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_ibeta_double ;
-run test_ibeta.cpp pch
+run test_ibeta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_ibeta_long_double ;
-run test_ibeta.cpp pch
+run test_ibeta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -231,7 +235,7 @@
<define>TEST_DATA=1
<toolset>intel:<pch>off
: test_ibeta_real_concept1 ;
-run test_ibeta.cpp
+run test_ibeta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -239,7 +243,7 @@
<define>TEST_DATA=2
<toolset>intel:<pch>off
: test_ibeta_real_concept2 ;
-run test_ibeta.cpp
+run test_ibeta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -247,7 +251,7 @@
<define>TEST_DATA=3
<toolset>intel:<pch>off
: test_ibeta_real_concept3 ;
-run test_ibeta.cpp
+run test_ibeta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -255,28 +259,28 @@
<define>TEST_DATA=4
<toolset>intel:<pch>off
: test_ibeta_real_concept4 ;
-run test_ibeta_inv.cpp pch
+run test_ibeta_inv.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_ibeta_inv_float ;
-run test_ibeta_inv.cpp pch
+run test_ibeta_inv.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_ibeta_inv_double ;
-run test_ibeta_inv.cpp pch
+run test_ibeta_inv.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_ibeta_inv_long_double ;
-run test_ibeta_inv.cpp pch
+run test_ibeta_inv.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -284,7 +288,7 @@
<define>TEST_DATA=1
<toolset>intel:<pch>off
: test_ibeta_inv_real_concept1 ;
-run test_ibeta_inv.cpp
+run test_ibeta_inv.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -292,7 +296,7 @@
<define>TEST_DATA=2
<toolset>intel:<pch>off
: test_ibeta_inv_real_concept2 ;
-run test_ibeta_inv.cpp
+run test_ibeta_inv.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -300,7 +304,7 @@
<define>TEST_DATA=3
<toolset>intel:<pch>off
: test_ibeta_inv_real_concept3 ;
-run test_ibeta_inv.cpp
+run test_ibeta_inv.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -308,28 +312,28 @@
<define>TEST_DATA=4
<toolset>intel:<pch>off
: test_ibeta_inv_real_concept4 ;
-run test_ibeta_inv_ab.cpp pch
+run test_ibeta_inv_ab.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_ibeta_inv_ab_float ;
-run test_ibeta_inv_ab.cpp pch
+run test_ibeta_inv_ab.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_ibeta_inv_ab_double ;
-run test_ibeta_inv_ab.cpp pch
+run test_ibeta_inv_ab.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_ibeta_inv_ab_long_double ;
-run test_ibeta_inv_ab.cpp pch
+run test_ibeta_inv_ab.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -337,7 +341,7 @@
<define>TEST_DATA=1
<toolset>intel:<pch>off
: test_ibeta_inv_ab_real_concept1 ;
-run test_ibeta_inv_ab.cpp
+run test_ibeta_inv_ab.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -345,7 +349,7 @@
<define>TEST_DATA=2
<toolset>intel:<pch>off
: test_ibeta_inv_ab_real_concept2 ;
-run test_ibeta_inv_ab.cpp
+run test_ibeta_inv_ab.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -353,57 +357,57 @@
<define>TEST_DATA=3
<toolset>intel:<pch>off
: test_ibeta_inv_ab_real_concept3 ;
-run test_igamma.cpp pch ;
-run test_igamma_inv.cpp pch
+run test_igamma.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_igamma_inv.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_igamma_inv_float ;
-run test_igamma_inv.cpp pch
+run test_igamma_inv.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_igamma_inv_double ;
-run test_igamma_inv.cpp pch
+run test_igamma_inv.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_igamma_inv_long_double ;
-run test_igamma_inv.cpp pch
+run test_igamma_inv.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_REAL_CONCEPT
<toolset>intel:<pch>off
: test_igamma_inv_real_concept ;
-run test_igamma_inva.cpp pch
+run test_igamma_inva.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_igamma_inva_float ;
-run test_igamma_inva.cpp pch
+run test_igamma_inva.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_igamma_inva_double ;
-run test_igamma_inva.cpp pch
+run test_igamma_inva.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_igamma_inva_long_double ;
-run test_igamma_inva.cpp pch
+run test_igamma_inva.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -411,92 +415,92 @@
<toolset>intel:<pch>off
: test_igamma_inva_real_concept ;
run test_instantiate1.cpp test_instantiate2.cpp ;
-run test_laplace.cpp /boost/unit_test//boost_unit_test_framework/<link>static ;
-run test_inv_hyp.cpp pch ;
-run test_laguerre.cpp pch ;
-run test_legendre.cpp pch ;
-run test_logistic_dist.cpp ;
-run test_lognormal.cpp ;
-run test_minima.cpp pch ;
-run test_negative_binomial.cpp
+run test_laplace.cpp ../../test/build//boost_unit_test_framework/<link>static ;
+run test_inv_hyp.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_laguerre.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_legendre.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_logistic_dist.cpp ../../test/build//boost_test_exec_monitor ;
+run test_lognormal.cpp ../../test/build//boost_test_exec_monitor ;
+run test_minima.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_negative_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_negative_binomial_float ;
-run test_negative_binomial.cpp
+run test_negative_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_negative_binomial_double ;
-run test_negative_binomial.cpp
+run test_negative_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_negative_binomial_long_double ;
-run test_negative_binomial.cpp
+run test_negative_binomial.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_REAL_CONCEPT
<toolset>intel:<pch>off
: test_negative_binomial_real_concept ;
-run test_next.cpp pch pch ;
-run test_nc_chi_squared.cpp pch
+run test_next.cpp pch pch ../../test/build//boost_test_exec_monitor ;
+run test_nc_chi_squared.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_nc_chi_squared_float ;
-run test_nc_chi_squared.cpp pch
+run test_nc_chi_squared.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_nc_chi_squared_double ;
-run test_nc_chi_squared.cpp pch
+run test_nc_chi_squared.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_nc_chi_squared_long_double ;
-run test_nc_chi_squared.cpp pch
+run test_nc_chi_squared.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_REAL_CONCEPT
<toolset>intel:<pch>off
: test_nc_chi_squared_real_concept ;
-run test_nc_beta.cpp pch
+run test_nc_beta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_nc_beta_float ;
-run test_nc_beta.cpp pch
+run test_nc_beta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_nc_beta_double ;
-run test_nc_beta.cpp pch
+run test_nc_beta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_nc_beta_long_double ;
-run test_nc_beta.cpp pch
+run test_nc_beta.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -504,7 +508,7 @@
<define>TEST_DATA=1
<toolset>intel:<pch>off
: test_nc_beta_real_concept1 ;
-run test_nc_beta.cpp
+run test_nc_beta.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
@@ -512,68 +516,68 @@
<define>TEST_DATA=2
<toolset>intel:<pch>off
: test_nc_beta_real_concept2 ;
-run test_nc_f.cpp pch ;
-run test_nc_t.cpp pch
+run test_nc_f.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_nc_t.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_nc_t_float ;
-run test_nc_t.cpp pch
+run test_nc_t.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_nc_t_double ;
-run test_nc_t.cpp pch
+run test_nc_t.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_nc_t_long_double ;
-run test_nc_t.cpp pch
+run test_nc_t.cpp pch ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_REAL_CONCEPT
<toolset>intel:<pch>off
: test_nc_t_real_concept ;
-run test_normal.cpp pch ;
-run test_pareto.cpp ;
-run test_poisson.cpp
+run test_normal.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_pareto.cpp ../../test/build//boost_test_exec_monitor ;
+run test_poisson.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_FLOAT
<toolset>intel:<pch>off
: test_poisson_float ;
-run test_poisson.cpp
+run test_poisson.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_DOUBLE
<toolset>intel:<pch>off
: test_poisson_double ;
-run test_poisson.cpp
+run test_poisson.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_LDOUBLE
<toolset>intel:<pch>off
: test_poisson_long_double ;
-run test_poisson.cpp
+run test_poisson.cpp ../../test/build//boost_test_exec_monitor
: # command line
: # input files
: # requirements
<define>TEST_REAL_CONCEPT
<toolset>intel:<pch>off
: test_poisson_real_concept ;
-run test_rayleigh.cpp ;
+run test_rayleigh.cpp ../../test/build//boost_test_exec_monitor ;
-run test_rationals.cpp
+run test_rationals.cpp ../../test/build//boost_test_exec_monitor
test_rational_instances/test_rational_double1.cpp
test_rational_instances/test_rational_double2.cpp
test_rational_instances/test_rational_double3.cpp
@@ -595,44 +599,48 @@
test_rational_instances/test_rational_real_concept5.cpp
;
-run test_remez.cpp pch ;
-run test_roots.cpp pch ;
-run test_round.cpp pch ;
-run test_spherical_harmonic.cpp pch ;
-run test_students_t.cpp ;
-run test_tgamma_ratio.cpp pch ;
-run test_toms748_solve.cpp pch ;
-run test_triangular.cpp pch ;
-run test_uniform.cpp pch ;
-run test_weibull.cpp ;
-run test_zeta.cpp pch ;
-
-run test_policy.cpp ;
-run test_policy_2.cpp ;
-run test_policy_3.cpp ;
-run test_policy_4.cpp ;
-run test_policy_5.cpp ;
-run test_policy_6.cpp ;
-run test_policy_7.cpp ;
-run test_policy_sf.cpp ;
+run test_remez.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_roots.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_round.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_spherical_harmonic.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_students_t.cpp ../../test/build//boost_test_exec_monitor ;
+run test_sign.cpp ../../test/build//boost_test_exec_monitor ;
+run test_tgamma_ratio.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_toms748_solve.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_triangular.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_uniform.cpp pch ../../test/build//boost_test_exec_monitor ;
+run test_weibull.cpp ../../test/build//boost_test_exec_monitor ;
+run test_zeta.cpp pch ../../test/build//boost_test_exec_monitor ;
+
+run test_policy.cpp ../../test/build//boost_test_exec_monitor ;
+run test_policy_2.cpp ../../test/build//boost_test_exec_monitor ;
+run test_policy_3.cpp ../../test/build//boost_test_exec_monitor ;
+run test_policy_4.cpp ../../test/build//boost_test_exec_monitor ;
+run test_policy_5.cpp ../../test/build//boost_test_exec_monitor ;
+run test_policy_6.cpp ../../test/build//boost_test_exec_monitor ;
+run test_policy_7.cpp ../../test/build//boost_test_exec_monitor ;
+run test_policy_8.cpp ../../test/build//boost_test_exec_monitor ;
+run test_policy_sf.cpp ../../test/build//boost_test_exec_monitor ;
run test_tr1.cpp
../build//boost_math_tr1
../build//boost_math_tr1f
../build//boost_math_c99
../build//boost_math_c99f
+ ../../test/build//boost_test_exec_monitor
;
run test_tr1.cpp
../build//boost_math_tr1l
../build//boost_math_c99l
+ ../../test/build//boost_test_exec_monitor
: : :
<define>TEST_LD=1
<dependency>../config//has_long_double_support
:
test_tr1_long_double
;
-
+
run compile_test/compl_abs_incl_test.cpp compile_test/main.cpp ;
run compile_test/compl_acos_incl_test.cpp compile_test/main.cpp ;
run compile_test/compl_acosh_incl_test.cpp compile_test/main.cpp ;
@@ -724,9 +732,26 @@
compile compile_test/tools_test_inc_test.cpp ;
compile compile_test/tools_toms748_inc_test.cpp ;
+run ../test/common_factor_test.cpp
+ ../../test/build//boost_unit_test_framework/<link>static ;
+
+run ../octonion/octonion_test.cpp
+ ../../test/build//boost_unit_test_framework/<link>static ;
+
+run ../quaternion/quaternion_test.cpp
+ ../../test/build//boost_unit_test_framework/<link>static ;
+
+run ../quaternion/quaternion_mult_incl_test.cpp
+ ../quaternion/quaternion_mi1.cpp
+ ../quaternion/quaternion_mi2.cpp
+ ../../test/build//boost_unit_test_framework/<link>static ;
+
+run complex_test.cpp ../../test/build//boost_test_exec_monitor ;
+
compile ntl_concept_check.cpp : <dependency>../config//has_ntl_rr ;
compile mpfr_concept_check.cpp : <dependency>../config//has_mpfr_class ;
build-project ../example ;
+
Modified: sandbox/math_toolkit/libs/math/test/hypot_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/hypot_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/hypot_test.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/hypot.hpp>
Modified: sandbox/math_toolkit/libs/math/test/log1p_expm1_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/log1p_expm1_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/log1p_expm1_test.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,7 @@
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/log1p.hpp>
#include <boost/math/special_functions/expm1.hpp>
Modified: sandbox/math_toolkit/libs/math/test/pow_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/pow_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/pow_test.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -11,7 +11,7 @@
#include <iostream>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/typeof/typeof.hpp>
Modified: sandbox/math_toolkit/libs/math/test/powm1_sqrtp1m1_test.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/powm1_sqrtp1m1_test.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/powm1_sqrtp1m1_test.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/sqrt1pm1.hpp>
#include <boost/math/special_functions/powm1.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_bernoulli.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bernoulli.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bernoulli.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -25,7 +25,7 @@
#include <boost/math/distributions/bernoulli.hpp> // for bernoulli_distribution
using boost::math::bernoulli_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE_FRACTION, BOOST_CHECK_EQUAL...
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -7,7 +7,7 @@
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/bessel.hpp>
#include <boost/math/special_functions/trunc.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/bessel.hpp>
#include <boost/type_traits/is_floating_point.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_k.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -14,7 +14,7 @@
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/bessel.hpp>
#include <boost/type_traits/is_floating_point.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -7,7 +7,7 @@
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/bessel.hpp>
#include <boost/type_traits/is_floating_point.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_beta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_beta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_beta.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -5,16 +5,16 @@
// 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 <pch.hpp>
+
#ifdef _MSC_VER
# pragma warning (disable : 4996) // POSIX name for this item is deprecated
# pragma warning (disable : 4224) // nonstandard extension used : formal parameter 'arg' was previously defined as a type
# pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
#endif
-#include <pch.hpp>
-
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/beta.hpp>
#include <boost/math/tools/stats.hpp>
@@ -80,14 +80,14 @@
".*", // platform
"(long\\s+)?double", // test type(s)
"Beta Function: Medium.*", // test data group
- "boost::math::beta", 130, 35); // test function
+ "boost::math::beta", 160, 35); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
"(long\\s+)?double", // test type(s)
"Beta Function: Divergent.*", // test data group
- "boost::math::beta", 20, 6); // test function
+ "boost::math::beta", 30, 6); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
@@ -101,7 +101,7 @@
".*", // platform
"real_concept", // test type(s)
"Beta Function: Medium.*", // test data group
- "boost::math::beta", 130, 35); // test function
+ "boost::math::beta", 150, 40); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
Modified: sandbox/math_toolkit/libs/math/test/test_beta_dist.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_beta_dist.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_beta_dist.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -40,7 +40,7 @@
using boost::math::beta_distribution;
using boost::math::beta;
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE_FRACTION
#include <iostream>
@@ -131,7 +131,7 @@
cout << "std::numeric_limits::epsilon = " << std::numeric_limits<RealType>::epsilon() <<endl;
cout << "epsilon = " << tolerance;
- tolerance *= 1000; // Note: NO * 100 because is fraction, NOT %.
+ tolerance *= 100000; // Note: NO * 100 because is fraction, NOT %.
cout << ", Tolerance = " << tolerance * 100 << "%." << endl;
// RealType teneps = boost::math::tools::epsilon<RealType>() * 10;
Modified: sandbox/math_toolkit/libs/math/test/test_binomial.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_binomial.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_binomial.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -29,7 +29,7 @@
#include <boost/math/distributions/binomial.hpp> // for binomial_distribution
using boost::math::binomial_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_binomial_coeff.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_binomial_coeff.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_binomial_coeff.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/binomial.hpp>
#include <boost/math/special_functions/trunc.hpp>
@@ -69,14 +69,14 @@
".*", // platform
"real_concept", // test type(s)
".*large.*", // test data group
- ".*", 200, 100); // test function
+ ".*", 250, 100); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
".*", // platform
"real_concept", // test type(s)
".*", // test data group
- ".*", 100, 30); // test function
+ ".*", 150, 30); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
Modified: sandbox/math_toolkit/libs/math/test/test_carlson.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_carlson.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_carlson.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/ellint_rf.hpp>
#include <boost/math/special_functions/ellint_rc.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_cauchy.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_cauchy.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_cauchy.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -23,7 +23,7 @@
#include <boost/math/distributions/cauchy.hpp>
using boost::math::cauchy_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_cbrt.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_cbrt.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_cbrt.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/stats.hpp>
#include <boost/math/tools/test.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_chi_squared.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_chi_squared.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_chi_squared.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -15,7 +15,7 @@
using boost::math::chi_squared_distribution;
using boost::math::chi_squared;
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_classify.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_classify.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_classify.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -11,7 +11,7 @@
#include <boost/limits.hpp>
#include <boost/math/concepts/real_concept.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#ifdef _MSC_VER
#pragma warning(disable: 4127) // conditional expression is constant
Modified: sandbox/math_toolkit/libs/math/test/test_constants.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_constants.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_constants.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -11,7 +11,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp> // for real_concept
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/constants/constants.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_digamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_digamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_digamma.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/digamma.hpp>
#include <boost/array.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_dist_overloads.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_dist_overloads.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_dist_overloads.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -12,7 +12,7 @@
#include <boost/math/distributions/normal.hpp>
using boost::math::normal_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_ellint_1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ellint_1.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ellint_1.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -14,7 +14,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/ellint_1.hpp>
#include <boost/array.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_ellint_2.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ellint_2.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ellint_2.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -14,7 +14,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/ellint_2.hpp>
#include <boost/array.hpp>
@@ -155,8 +155,8 @@
SC_(1e-05), SC_(800) / 1024, SC_(9.999999999898274739584436515967055859383969942432E-6),
SC_(1e+05), SC_(100) / 1024, SC_(99761.153306972066658135668386691227343323331995888),
SC_(1e+10), SC_(-0.5), SC_(9.3421545766487137036576748555295222252286528414669e9),
- ldexp(SC_(1), 66), SC_(400) / 1024, SC_(7.0886102721911705466476846969992069994308167515242e19),
- ldexp(SC_(1), 166), SC_(900) / 1024, SC_(7.1259011068364515942912094521783688927118026465790e49),
+ static_cast<T>(ldexp(SC_(1), 66)), SC_(400) / 1024, SC_(7.0886102721911705466476846969992069994308167515242e19),
+ static_cast<T>(ldexp(SC_(1), 166)), SC_(900) / 1024, SC_(7.1259011068364515942912094521783688927118026465790e49),
};
#undef SC_
Modified: sandbox/math_toolkit/libs/math/test/test_ellint_3.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ellint_3.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ellint_3.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -14,7 +14,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/ellint_3.hpp>
#include <boost/array.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_erf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_erf.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_erf.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -7,7 +7,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/erf.hpp>
#include <boost/math/constants/constants.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_error_handling.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_error_handling.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_error_handling.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -64,7 +64,7 @@
#include <boost/math/concepts/real_concept.hpp>
#include <boost/math/policies/policy.hpp>
#include <boost/math/policies/error_handling.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
//
// Define some policies:
//
Modified: sandbox/math_toolkit/libs/math/test/test_expint.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_expint.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_expint.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,7 @@
#include <boost/math/concepts/real_concept.hpp>
#include <boost/math/special_functions/expint.hpp>
#include <boost/math/special_functions/trunc.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/stats.hpp>
#include <boost/math/tools/test.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_exponential_dist.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_exponential_dist.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_exponential_dist.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -12,7 +12,7 @@
#include <boost/math/distributions/exponential.hpp>
using boost::math::exponential_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_extreme_value.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_extreme_value.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_extreme_value.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -11,7 +11,7 @@
#include <boost/math/distributions/extreme_value.hpp>
using boost::math::extreme_value_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_factorials.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_factorials.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_factorials.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -14,7 +14,7 @@
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/factorials.hpp>
#include <boost/math/special_functions/gamma.hpp>
@@ -140,7 +140,7 @@
static_cast<T>(3.35010902064291983728782493133164809108646650368560147505884e-27L), tolerance);
BOOST_CHECK_CLOSE(
::boost::math::rising_factorial(static_cast<T>(-30.25), 21),
- static_cast<T>(-9.76168312768123676601980433377916854311706629232503473758698e26L), tolerance);
+ static_cast<T>(-9.76168312768123676601980433377916854311706629232503473758698e26L), tolerance * 2);
BOOST_CHECK_CLOSE(
::boost::math::rising_factorial(static_cast<T>(-30.25), -21),
static_cast<T>(-1.50079704000923674318934280259377728203516775215430875839823e-34L), 2 * tolerance);
Modified: sandbox/math_toolkit/libs/math/test/test_find_location.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_find_location.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_find_location.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -29,7 +29,7 @@
#include <boost/math/policies/policy.hpp>
using boost::math::policies::policy;
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE_FRACTION, BOOST_CHECK_EQUAL...
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_find_scale.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_find_scale.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_find_scale.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -29,7 +29,7 @@
#include <boost/math/policies/policy.hpp>
using boost::math::policies::policy;
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE_FRACTION, BOOST_CHECK_EQUAL...
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_fisher_f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_fisher_f.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_fisher_f.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -14,7 +14,7 @@
#include <boost/math/distributions/fisher_f.hpp> // for fisher_f_distribution
using boost::math::fisher_f_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_gamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_gamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_gamma.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -10,7 +10,7 @@
#include <boost/math/concepts/real_concept.hpp>
#include <boost/math/special_functions/gamma.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/stats.hpp>
#include <boost/math/tools/test.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_gamma_dist.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_gamma_dist.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_gamma_dist.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -18,7 +18,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp> // for real_concept
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/gamma.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_gamma_hooks.hpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_gamma_hooks.hpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_gamma_hooks.hpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -162,12 +162,117 @@
}
#endif
+#ifdef TEST_DCDFLIB
+#define TEST_OTHER
+#include <dcdflib.h>
+
+namespace other{
+float tgamma(float z)
+{
+ double v = z;
+ return (float)gamma_x(&v);
+}
+double tgamma(double z)
+{
+ return gamma_x(&z);
+}
+long double tgamma(long double z)
+{
+ double v = z;
+ return gamma_x(&v);
+}
+float lgamma(float z)
+{
+ double v = z;
+ return (float)gamma_log(&v);
+}
+double lgamma(double z)
+{
+ double v = z;
+ return gamma_log(&v);
+}
+long double lgamma(long double z)
+{
+ double v = z;
+ return gamma_log(&v);
+}
+inline double gamma_q(double x, double y)
+{
+ double ans, qans;
+ int i = 0;
+ gamma_inc (&x, &y, &ans, &qans, &i);
+ return qans;
+}
+inline float gamma_q(float x, float y)
+{
+ return (float)gamma_q((double)x, (double)y);
+}
+inline long double gamma_q(long double x, long double y)
+{
+ return gamma_q((double)x, (double)y);
+}
+inline double gamma_p(double x, double y)
+{
+ double ans, qans;
+ int i = 0;
+ gamma_inc (&x, &y, &ans, &qans, &i);
+ return ans;
+}
+inline float gamma_p(float x, float y)
+{
+ return (float)gamma_p((double)x, (double)y);
+}
+inline long double gamma_p(long double x, long double y)
+{
+ return gamma_p((double)x, (double)y);
+}
+
+inline double gamma_q_inv(double x, double y)
+{
+ double ans, p, nul;
+ int i = 0;
+ p = 1 - y;
+ nul = 0;
+ gamma_inc_inv (&x, &ans, &nul, &p, &y, &i);
+ return ans;
+}
+inline float gamma_q_inv(float x, float y)
+{
+ return (float)gamma_q_inv((double)x, (double)y);
+}
+inline long double gamma_q_inv(long double x, long double y)
+{
+ return gamma_q_inv((double)x, (double)y);
+}
+inline double gamma_p_inv(double x, double y)
+{
+ double ans, p, nul;
+ int i = 0;
+ p = 1 - y;
+ nul = 0;
+ gamma_inc_inv (&x, &ans, &nul, &y, &p, &i);
+ return ans;
+}
+inline float gamma_p_inv(float x, float y)
+{
+ return (float)gamma_p_inv((double)x, (double)y);
+}
+inline long double gamma_p_inv(long double x, long double y)
+{
+ return gamma_p_inv((double)x, (double)y);
+}
+
+}
+#endif
+
#ifdef TEST_OTHER
namespace other{
boost::math::concepts::real_concept tgamma(boost::math::concepts::real_concept){ return 0; }
boost::math::concepts::real_concept lgamma(boost::math::concepts::real_concept){ return 0; }
boost::math::concepts::real_concept gamma_q(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
boost::math::concepts::real_concept gamma_p(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
+ boost::math::concepts::real_concept gamma_p_inv(boost::math::concepts::real_concept x, boost::math::concepts::real_concept y){ return 0; }
+ boost::math::concepts::real_concept gamma_q_inv(boost::math::concepts::real_concept x, boost::math::concepts::real_concept y){ return 0; }
}
#endif
Modified: sandbox/math_toolkit/libs/math/test/test_hermite.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_hermite.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_hermite.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -15,7 +15,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/hermite.hpp>
#include <boost/math/constants/constants.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_hypergeometric_dist.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_hypergeometric_dist.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_hypergeometric_dist.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -11,7 +11,9 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/hypergeometric.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/results_collector.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_ibeta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/beta.hpp>
#include <boost/math/tools/stats.hpp>
@@ -230,7 +230,7 @@
"[^|]*", // platform
largest_type, // test type(s)
"(?i).*small.*", // test data group
- ".*", 60, 10); // test function
+ ".*", 90, 25); // test function
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib
@@ -252,7 +252,7 @@
"[^|]*", // platform
"real_concept", // test type(s)
"(?i).*small.*", // test data group
- ".*", 60, 15); // test function
+ ".*", 90, 25); // test function
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib
Modified: sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/beta.hpp>
#include <boost/math/tools/stats.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta_inv_ab.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,7 @@
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/beta.hpp>
#include <boost/math/tools/stats.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_igamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -9,7 +9,7 @@
#include <boost/math/concepts/real_concept.hpp>
#include <boost/math/special_functions/gamma.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/stats.hpp>
#include <boost/math/tools/test.hpp>
@@ -93,7 +93,7 @@
"linux", // platform
"real_concept", // test type(s)
"[^|]*medium[^|]*", // test data group
- "[^|]*", 600, 200); // test function
+ "[^|]*", 1000, 200); // test function
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib
@@ -361,7 +361,7 @@
bind_func(funcp, 0, 1),
extract_result(3));
handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::gamma_q", test_name);
-#if defined(TEST_CEPHES) || defined(TEST_GSL)
+#if defined(TEST_OTHER)
//
// test other gamma_q(T, T) against data:
//
@@ -388,7 +388,7 @@
bind_func(funcp, 0, 1),
extract_result(5));
handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::gamma_p", test_name);
-#if defined(TEST_CEPHES) || defined(TEST_GSL)
+#if defined(TEST_OTHER)
//
// test other gamma_p(T, T) against data:
//
Modified: sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma_inv.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -7,7 +7,9 @@
#include <boost/math/concepts/real_concept.hpp>
#include <boost/math/special_functions/gamma.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
+#include <boost/test/results_collector.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/stats.hpp>
#include <boost/math/tools/test.hpp>
@@ -313,6 +315,29 @@
bind_func(funcp, 0, 1),
extract_result(3));
handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::gamma_q_inv", test_name);
+#ifdef TEST_OTHER
+ if(boost::is_floating_point<value_type>::value)
+ {
+ funcp = other::gamma_p_inv;
+ //
+ // test gamma_p_inv(T, T) against data:
+ //
+ result = boost::math::tools::test(
+ data,
+ bind_func(funcp, 0, 1),
+ extract_result(2));
+ print_test_result(result, data[result.worst()], result.worst(), type_name, "other::gamma_q");
+ //
+ // test gamma_q_inv(T, T) against data:
+ //
+ funcp = other::gamma_q_inv;
+ result = boost::math::tools::test(
+ data,
+ bind_func(funcp, 0, 1),
+ extract_result(3));
+ print_test_result(result, data[result.worst()], result.worst(), type_name, "other::gamma_q");
+ }
+#endif
}
template <class T>
Modified: sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma_inva.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -9,7 +9,9 @@
#include <boost/math/concepts/real_concept.hpp>
#include <boost/math/special_functions/gamma.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
+#include <boost/test/results_collector.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/stats.hpp>
#include <boost/math/tools/test.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_inv_hyp.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_inv_hyp.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_inv_hyp.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -9,7 +9,7 @@
#include <boost/math/special_functions/acosh.hpp>
#include <boost/math/special_functions/asinh.hpp>
#include <boost/math/special_functions/atanh.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/stats.hpp>
#include <boost/math/tools/test.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_laguerre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_laguerre.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_laguerre.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/laguerre.hpp>
#include <boost/math/constants/constants.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_laplace.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_laplace.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_laplace.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -27,7 +27,7 @@
Checks the relation between hazard, pdf and cdf.
hazard = pdf/(1-cdf)
-
+
Test 4: test_location_scale_symmetry()
Checks the pdf, cdf invariant for translation and scaling invariant
cdf(x,location,scale) = cdf( (x-location)/scale, 0, 1)
Modified: sandbox/math_toolkit/libs/math/test/test_legendre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_legendre.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_legendre.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -10,7 +10,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/legendre.hpp>
#include <boost/math/constants/constants.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_logistic_dist.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_logistic_dist.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_logistic_dist.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -11,7 +11,7 @@
#include <boost/math/distributions/logistic.hpp>
using boost::math::logistic_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
@@ -52,7 +52,7 @@
complement(logistic_distribution<RealType>(location,scale),
q)),
x,
- tolerance); // %
+ 2 * tolerance); // %
}
}
Modified: sandbox/math_toolkit/libs/math/test/test_lognormal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_lognormal.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_lognormal.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -9,7 +9,7 @@
// test_lognormal.cpp
#include <boost/math/concepts/real_concept.hpp> // for real_concept
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/lognormal.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_minima.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_minima.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_minima.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,7 @@
#include <pch.hpp>
#include <boost/math/tools/minima.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/gamma.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_nc_beta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_nc_beta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_nc_beta.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -23,7 +23,9 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/non_central_beta.hpp> // for chi_squared_distribution
#include <boost/math/distributions/poisson.hpp> // for chi_squared_distribution
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <boost/test/results_collector.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
#include "functor.hpp"
@@ -105,14 +107,14 @@
"[^|]*", // platform
largest_type, // test type(s)
"[^|]*medium[^|]*", // test data group
- "[^|]*", 900, 500); // test function
+ "[^|]*", 1200, 500); // test function
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib
"[^|]*", // platform
largest_type, // test type(s)
"[^|]*large[^|]*", // test data group
- "[^|]*", 40000, 5500); // test function
+ "[^|]*", 40000, 6000); // test function
}
#endif
//
@@ -138,7 +140,7 @@
"[^|]*", // platform
largest_type, // test type(s)
"[^|]*large[^|]*", // test data group
- "[^|]*", 10000, 2000); // test function
+ "[^|]*", 20000, 2000); // test function
//
// Finish off by printing out the compiler/stdlib/platform names,
// we do this to make it easier to mark up expected error rates.
Modified: sandbox/math_toolkit/libs/math/test/test_nc_chi_squared.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_nc_chi_squared.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_nc_chi_squared.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -23,7 +23,9 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/non_central_chi_squared.hpp> // for chi_squared_distribution
#include <boost/math/special_functions/cbrt.hpp> // for chi_squared_distribution
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <boost/test/results_collector.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
#include "functor.hpp"
Modified: sandbox/math_toolkit/libs/math/test/test_nc_f.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_nc_f.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_nc_f.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -22,7 +22,9 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/non_central_f.hpp> // for chi_squared_distribution
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <boost/test/results_collector.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
#include "functor.hpp"
Modified: sandbox/math_toolkit/libs/math/test/test_nc_t.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_nc_t.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_nc_t.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -22,7 +22,9 @@
#include <boost/math/concepts/real_concept.hpp> // for real_concept
#include <boost/math/distributions/non_central_t.hpp> // for chi_squared_distribution
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <boost/test/results_collector.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
#include "functor.hpp"
Modified: sandbox/math_toolkit/libs/math/test/test_negative_binomial.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_negative_binomial.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_negative_binomial.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -35,7 +35,7 @@
#include <boost/math/special_functions/gamma.hpp>
using boost::math::lgamma; // log gamma
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
#include <boost/test/floating_point_comparison.hpp> // for BOOST_CHECK_CLOSE
#include <iostream>
@@ -197,7 +197,7 @@
RealType tolerance = (std::max)
(boost::math::tools::epsilon<RealType>(),
static_cast<RealType>(std::numeric_limits<double>::epsilon()));
- tolerance *= 100 * 1000;
+ tolerance *= 100 * 100000.0f;
cout << "Tolerance = " << tolerance << "%." << endl;
Modified: sandbox/math_toolkit/libs/math/test/test_next.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_next.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_next.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/next.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_normal.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_normal.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_normal.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -24,7 +24,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp> // for real_concept
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/normal.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_pareto.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_pareto.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_pareto.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -24,7 +24,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp> // for real_concept
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/pareto.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_poisson.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_poisson.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_poisson.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -23,7 +23,7 @@
# pragma warning(disable: 4127) // conditional expression is constant.
#endif
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/concepts/real_concept.hpp> // for real_concept
Modified: sandbox/math_toolkit/libs/math/test/test_policy.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,8 @@
#include <boost/math/policies/policy.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <iostream>
template <class P1, class P2>
bool check_same(const P1&, const P2&)
Modified: sandbox/math_toolkit/libs/math/test/test_policy_2.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_2.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_2.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,8 @@
#include <boost/math/policies/policy.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <iostream>
template <class P1, class P2>
bool check_same(const P1&, const P2&)
Modified: sandbox/math_toolkit/libs/math/test/test_policy_3.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_3.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_3.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,8 @@
#include <boost/math/policies/policy.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <iostream>
template <class P1, class P2>
bool check_same(const P1&, const P2&)
Modified: sandbox/math_toolkit/libs/math/test/test_policy_4.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_4.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_4.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,8 @@
#include <boost/math/policies/policy.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <iostream>
template <class P1, class P2>
bool check_same(const P1&, const P2&)
Modified: sandbox/math_toolkit/libs/math/test/test_policy_5.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_5.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_5.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,8 @@
#include <boost/math/policies/policy.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <iostream>
template <class P1, class P2>
bool check_same(const P1&, const P2&)
Modified: sandbox/math_toolkit/libs/math/test/test_policy_6.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_6.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_6.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,8 @@
#include <boost/math/policies/policy.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <iostream>
template <class P1, class P2>
bool check_same(const P1&, const P2&)
Modified: sandbox/math_toolkit/libs/math/test/test_policy_7.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_7.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_7.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,8 @@
#include <boost/math/policies/policy.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/test/included/test_exec_monitor.hpp> // for test_main
+#include <boost/test/test_exec_monitor.hpp> // for test_main
+#include <iostream>
template <class P1, class P2>
bool check_same(const P1&, const P2&)
@@ -35,21 +36,6 @@
BOOST_CHECK(check_same(make_policy(pole_error<ignore_error>()), normalise<policy<pole_error<ignore_error> > >::type()));
BOOST_CHECK(check_same(make_policy(indeterminate_result_error<ignore_error>()), normalise<policy<indeterminate_result_error<ignore_error> > >::type()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>()), policy<domain_error<ignore_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), indeterminate_result_error<throw_on_error>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, indeterminate_result_error<throw_on_error> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), indeterminate_result_error<throw_on_error>(), digits2<10>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, indeterminate_result_error<throw_on_error>, digits2<10> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), indeterminate_result_error<throw_on_error>(), digits10<5>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, indeterminate_result_error<throw_on_error>, digits2<19> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), indeterminate_result_error<throw_on_error>(), digits2<10>(), promote_float<false>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, indeterminate_result_error<throw_on_error>, digits2<10>, promote_float<false> >()));
-#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), indeterminate_result_error<throw_on_error>(), digits2<10>(), promote_float<false>(), promote_double<false>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, indeterminate_result_error<throw_on_error>, digits2<10>, promote_float<false>, promote_double<false> >()));
- BOOST_CHECK(check_same(make_policy(domain_error<ignore_error>(), pole_error<ignore_error>(), overflow_error<ignore_error>(), underflow_error<throw_on_error>(), denorm_error<throw_on_error>(), evaluation_error<ignore_error>(), indeterminate_result_error<throw_on_error>(), digits2<10>(), promote_float<false>(), promote_double<false>(), discrete_quantile<integer_round_down>()), policy<domain_error<ignore_error>, pole_error<ignore_error>, overflow_error<ignore_error>, underflow_error<throw_on_error>, denorm_error<throw_on_error>, evaluation_error<ignore_error>, indeterminate_result_error<throw_on_error>, digits2<10>, promote_float<false>, promote_double<false>, discrete_quantile<integer_round_down> >()));
-#endif
-
return 0;
} // int test_main(int, char* [])
Modified: sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_policy_sf.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -3,7 +3,7 @@
// 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/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_rationals.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_rationals.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_rationals.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -4,7 +4,7 @@
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/array.hpp>
#include <boost/math/tools/rational.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_rayleigh.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_rayleigh.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_rayleigh.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -16,7 +16,7 @@
#include <boost/math/distributions/rayleigh.hpp>
using boost::math::rayleigh_distribution;
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <iostream>
Modified: sandbox/math_toolkit/libs/math/test/test_remez.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_remez.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_remez.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -14,7 +14,7 @@
#endif
#include <boost/math/tools/remez.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/expm1.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_roots.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_roots.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_roots.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -5,11 +5,13 @@
#include <pch.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/test/results_collector.hpp>
#include <boost/math/special_functions/beta.hpp>
#include <boost/math/tools/roots.hpp>
+#include <boost/test/results_collector.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/array.hpp>
#define BOOST_CHECK_CLOSE_EX(a, b, prec, i) \
Modified: sandbox/math_toolkit/libs/math/test/test_round.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_round.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_round.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/round.hpp>
#include <boost/math/special_functions/trunc.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_spherical_harmonic.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_spherical_harmonic.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_spherical_harmonic.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -6,7 +6,7 @@
#include <pch.hpp>
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/spherical_harmonic.hpp>
#include <boost/math/constants/constants.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_students_t.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_students_t.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_students_t.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -14,7 +14,7 @@
// Basic sanity test for Student's t probability (quantile) (0. < p < 1).
// and Student's t probability Quantile (0. < p < 1).
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/concepts/real_concept.hpp> // for real_concept
Modified: sandbox/math_toolkit/libs/math/test/test_tgamma_ratio.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_tgamma_ratio.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_tgamma_ratio.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -8,7 +8,7 @@
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
#include <boost/math/concepts/real_concept.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/gamma.hpp>
#include <boost/math/tools/stats.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_toms748_solve.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_toms748_solve.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_toms748_solve.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -5,7 +5,7 @@
#include <pch.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/toms748_solve.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_tr1.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_tr1.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_tr1.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -3,7 +3,7 @@
// 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/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/precision.hpp>
#include <math.h> // ldexpf
Modified: sandbox/math_toolkit/libs/math/test/test_triangular.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_triangular.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_triangular.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -16,7 +16,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp> // for real_concept
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/triangular.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_uniform.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_uniform.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_uniform.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -16,7 +16,7 @@
#endif
#include <boost/math/concepts/real_concept.hpp> // for real_concept
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/uniform.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_weibull.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_weibull.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_weibull.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -9,7 +9,7 @@
// test_weibull.cpp
#include <boost/math/concepts/real_concept.hpp> // for real_concept
-#include <boost/test/included/test_exec_monitor.hpp> // Boost.Test
+#include <boost/test/test_exec_monitor.hpp> // Boost.Test
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/distributions/weibull.hpp>
Modified: sandbox/math_toolkit/libs/math/test/test_zeta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_zeta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_zeta.cpp 2009-10-09 08:38:32 EDT (Fri, 09 Oct 2009)
@@ -7,7 +7,7 @@
#include <boost/math/concepts/real_concept.hpp>
#include <boost/math/special_functions/zeta.hpp>
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/test_exec_monitor.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/tools/stats.hpp>
#include <boost/math/tools/test.hpp>
@@ -88,7 +88,7 @@
".*", // platform
"real_concept", // test type(s)
".*", // test data group
- ".*", 10, 5); // test function
+ ".*", 16, 5); // test function
std::cout << "Tests run with " << BOOST_COMPILER << ", "
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
@@ -176,7 +176,7 @@
BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast<T>(4.5)), static_cast<T>(1.05470751076145426402296728896028011727249383295625173068468L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast<T>(6.5)), static_cast<T>(1.01200589988852479610078491680478352908773213619144808841031L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast<T>(7.5)), static_cast<T>(1.00582672753652280770224164440459408011782510096320822989663L), tolerance);
- BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast<T>(8.125)), static_cast<T>(1.0037305205308161603183307711439385250181080293472L), tolerance);
+ BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast<T>(8.125)), static_cast<T>(1.0037305205308161603183307711439385250181080293472L), 2 * tolerance);
BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast<T>(16.125)), static_cast<T>(1.0000140128224754088474783648500235958510030511915L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast<T>(0)), static_cast<T>(-0.5L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::zeta(static_cast<T>(-0.125)), static_cast<T>(-0.39906966894504503550986928301421235400280637468895L), tolerance);
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