Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76079 - in sandbox/big_number: boost/multiprecision boost/multiprecision/detail libs/multiprecision/test libs/multiprecision/test/math
From: john_at_[hidden]
Date: 2011-12-20 11:19:59


Author: johnmaddock
Date: 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
New Revision: 76079
URL: http://svn.boost.org/trac/boost/changeset/76079

Log:
Add tests for Boost.Math special functions, and fix whatever errors came up in running those tests.
Add workaround for compilers that don't have a std::abs(long long).
Added:
   sandbox/big_number/libs/multiprecision/test/math/test_cbrt.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_digamma.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ellint_1.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ellint_2.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ellint_3.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_erf.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_expint.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_gamma.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_hermite.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_2.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_3.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_4.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_1.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_igamma.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_igamma_inv.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_igamma_inva.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_laguerre.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_legendre.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_tgamma_ratio.cpp (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/math/test_zeta.cpp (contents, props changed)
Text files modified:
   sandbox/big_number/boost/multiprecision/cpp_float.hpp | 8 ++++----
   sandbox/big_number/boost/multiprecision/detail/mp_number_base.hpp | 11 ++++++++++-
   sandbox/big_number/boost/multiprecision/gmp.hpp | 9 ++++++---
   sandbox/big_number/boost/multiprecision/mpfr.hpp | 3 ++-
   sandbox/big_number/boost/multiprecision/tommath.hpp | 3 ++-
   sandbox/big_number/libs/multiprecision/test/Jamfile.v2 | 3 +++
   sandbox/big_number/libs/multiprecision/test/math/log1p_expm1_test.cpp | 18 ++++++++++++++++++
   sandbox/big_number/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp | 9 +++++++++
   sandbox/big_number/libs/multiprecision/test/math/test_bessel_i.cpp | 4 ++--
   sandbox/big_number/libs/multiprecision/test/math/test_bessel_j.cpp | 2 +-
   sandbox/big_number/libs/multiprecision/test/math/test_bessel_k.cpp | 8 ++++++++
   sandbox/big_number/libs/multiprecision/test/math/test_bessel_y.cpp | 14 ++++++++++++++
   sandbox/big_number/libs/multiprecision/test/math/test_binomial_coeff.cpp | 10 +++++++++-
   sandbox/big_number/libs/multiprecision/test/math/test_carlson.cpp | 5 -----
   14 files changed, 88 insertions(+), 19 deletions(-)

Modified: sandbox/big_number/boost/multiprecision/cpp_float.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/cpp_float.hpp (original)
+++ sandbox/big_number/boost/multiprecision/cpp_float.hpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -2733,8 +2733,8 @@
    }
 
    long long t = result.order();
-
- if(std::abs(t) < ((std::numeric_limits<long long>::max)() / 1000))
+ BOOST_MP_USING_ABS
+ if(abs(t) < ((std::numeric_limits<long long>::max)() / 1000))
    {
       t *= 1000;
       t /= 301;
@@ -2756,8 +2756,8 @@
       t /= 2;
       result *= cpp_float<Digits10>::pow2(-t);
    }
-
- if(std::abs(result.order()) > 5)
+ BOOST_MP_USING_ABS
+ if(abs(result.order()) > 5)
    {
       // If our first estimate doesn't get close enough then try recursion until we do:
       long long e2;

Modified: sandbox/big_number/boost/multiprecision/detail/mp_number_base.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/detail/mp_number_base.hpp (original)
+++ sandbox/big_number/boost/multiprecision/detail/mp_number_base.hpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -28,6 +28,14 @@
 template<class tag, class Arg1 = void, class Arg2 = void, class Arg3 = void>
 struct mp_exp;
 
+template <class T>
+typename boost::enable_if<is_arithmetic<T>, T>::type abs(const T& t)
+{
+ return t < 0 ? -t : t;
+}
+
+#define BOOST_MP_USING_ABS using std::abs; using boost::multiprecision::detail::abs;
+
 template <int b>
 struct has_enough_bits
 {
@@ -465,11 +473,12 @@
    }
    else
    {
+ BOOST_MP_USING_ABS
       // Scientific format:
       if(showpoint || (str.size() > 1))
          str.insert(1, 1, '.');
       str.append(1, 'e');
- S e = boost::lexical_cast<S>(std::abs(my_exp));
+ S e = boost::lexical_cast<S>(abs(my_exp));
       if(e.size() < BOOST_MP_MIN_EXPONENT_DIGITS)
          e.insert(0, BOOST_MP_MIN_EXPONENT_DIGITS-e.size(), '0');
       if(my_exp < 0)

Modified: sandbox/big_number/boost/multiprecision/gmp.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/gmp.hpp (original)
+++ sandbox/big_number/boost/multiprecision/gmp.hpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -83,8 +83,9 @@
    }
    gmp_float_imp& operator = (boost::intmax_t i)
    {
+ BOOST_MP_USING_ABS
       bool neg = i < 0;
- *this = static_cast<boost::uintmax_t>(std::abs(i));
+ *this = static_cast<boost::uintmax_t>(abs(i));
       if(neg)
          mpf_neg(m_data, m_data);
       return *this;
@@ -910,8 +911,9 @@
    }
    gmp_int& operator = (boost::intmax_t i)
    {
+ BOOST_MP_USING_ABS
       bool neg = i < 0;
- *this = static_cast<boost::uintmax_t>(std::abs(i));
+ *this = static_cast<boost::uintmax_t>(abs(i));
       if(neg)
          mpz_neg(m_data, m_data);
       return *this;
@@ -1448,8 +1450,9 @@
    }
    gmp_rational& operator = (boost::intmax_t i)
    {
+ BOOST_MP_USING_ABS
       bool neg = i < 0;
- *this = static_cast<boost::uintmax_t>(std::abs(i));
+ *this = static_cast<boost::uintmax_t>(abs(i));
       if(neg)
          mpq_neg(m_data, m_data);
       return *this;

Modified: sandbox/big_number/boost/multiprecision/mpfr.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/mpfr.hpp (original)
+++ sandbox/big_number/boost/multiprecision/mpfr.hpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -80,8 +80,9 @@
    }
    mpfr_float_imp& operator = (boost::intmax_t i)
    {
+ BOOST_MP_USING_ABS
       bool neg = i < 0;
- *this = static_cast<boost::uintmax_t>(std::abs(i));
+ *this = static_cast<boost::uintmax_t>(abs(i));
       if(neg)
          mpfr_neg(m_data, m_data, GMP_RNDN);
       return *this;

Modified: sandbox/big_number/boost/multiprecision/tommath.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/tommath.hpp (original)
+++ sandbox/big_number/boost/multiprecision/tommath.hpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -70,8 +70,9 @@
    }
    tommath_int& operator = (boost::intmax_t i)
    {
+ BOOST_MP_USING_ABS
       bool neg = i < 0;
- *this = static_cast<boost::uintmax_t>(std::abs(i));
+ *this = static_cast<boost::uintmax_t>(abs(i));
       if(neg)
          detail::check_tommath_result(mp_neg(&m_data, &m_data));
       return *this;

Modified: sandbox/big_number/libs/multiprecision/test/Jamfile.v2
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/Jamfile.v2 (original)
+++ sandbox/big_number/libs/multiprecision/test/Jamfile.v2 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -640,6 +640,7 @@
          <define>TEST_MPFR_50
          <optimization>speed
          <define>BOOST_ALL_NO_LIB
+ <toolset>msvc:<cxxflags>-bigobj
         : $(source:B)_mpfr ;
    run $(source) gmp /boost/test//boost_test_exec_monitor/<link>static /boost/regex//boost_regex/<link>static
         : # command line
@@ -649,6 +650,7 @@
          <optimization>speed
          <define>TEST_MPF_50
          <define>BOOST_ALL_NO_LIB
+ <toolset>msvc:<cxxflags>-bigobj
         : $(source:B)_mpf ;
    run $(source) /boost/test//boost_test_exec_monitor/<link>static /boost/regex//boost_regex/<link>static
         : # command line
@@ -657,5 +659,6 @@
          <define>TEST_CPP_FLOAT
          <define>BOOST_ALL_NO_LIB
          <optimization>speed
+ <toolset>msvc:<cxxflags>-bigobj
         : $(source:B)_cpp_float ;
 }

Modified: sandbox/big_number/libs/multiprecision/test/math/log1p_expm1_test.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/log1p_expm1_test.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/log1p_expm1_test.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -84,6 +84,24 @@
       ".*", // compiler
       ".*", // stdlib
       ".*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", // test function
+ 500, // Max Peek error
+ 100); // Max mean error
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*mpfr_float_backend<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", // test function
+ 500, // Max Peek error
+ 100); // Max mean error
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
       ".*", // test type(s)
       ".*", // test data group
       ".*", // test function

Modified: sandbox/big_number/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -84,6 +84,15 @@
       ".*", // compiler
       ".*", // stdlib
       ".*", // platform
+ ".*mpfr_float_backend<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", // test function
+ 300, // Max Peek error
+ 50); // Max mean error
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
       ".*", // test type(s)
       ".*", // test data group
       ".*", // test function

Modified: sandbox/big_number/libs/multiprecision/test/math/test_bessel_i.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_bessel_i.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_bessel_i.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -62,8 +62,8 @@
       ".*", // test type(s)
       ".*", // test data group
       ".*", // test function
- 250, // Max Peek error
- 100); // Max mean error
+ 300, // Max Peek error
+ 200); // Max mean error
 
    //
    // Finish off by printing out the compiler/stdlib/platform names,

Modified: sandbox/big_number/libs/multiprecision/test/math/test_bessel_j.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_bessel_j.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_bessel_j.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -65,7 +65,7 @@
       ".*", // platform
       ".*", // test type(s)
       ".*J1.*Tricky.*", // test data group
- ".*", 5000000, 5000000); // test function
+ ".*", 10000000, 5000000); // test function
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib

Modified: sandbox/big_number/libs/multiprecision/test/math/test_bessel_k.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_bessel_k.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_bessel_k.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -13,6 +13,7 @@
 #endif
 
 #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
 
 #if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
 # define TEST_MPF_50
@@ -63,6 +64,13 @@
       ".*", // compiler
       ".*", // stdlib
       ".*", // platform
+ ".*mpfr_float_backend<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", 3000, 1000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
       ".*", // test type(s)
       ".*large.*", // test data group
       ".*", 80, 50); // test function

Modified: sandbox/big_number/libs/multiprecision/test/math/test_bessel_y.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_bessel_y.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_bessel_y.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -62,6 +62,13 @@
       ".*", // compiler
       ".*", // stdlib
       ".*", // platform
+ ".*mpfr_float_backend<18>.*", // test type(s)
+ ".*Y0.*", // test data group
+ ".*", 3000, 2000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
       ".*", // test type(s)
       ".*Y0.*", // test data group
       ".*", 800, 400); // test function
@@ -76,6 +83,13 @@
       ".*", // compiler
       ".*", // stdlib
       ".*", // platform
+ ".*mpfr_float_backend<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", 10000, 4000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
       ".*", // test type(s)
       ".*", // test data group
       ".*", 80, 40); // test function

Modified: sandbox/big_number/libs/multiprecision/test/math/test_binomial_coeff.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_binomial_coeff.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_binomial_coeff.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -57,7 +57,14 @@
       ".*", // platform
       ".*gmp.*", // test type(s)
       ".*", // test data group
- ".*", 3000, 200); // test function
+ ".*", 3000, 1500); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*mpfr_float_backend<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", 500, 100); // test function
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib
@@ -105,3 +112,4 @@
 
 
 
+

Modified: sandbox/big_number/libs/multiprecision/test/math/test_carlson.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/math/test_carlson.cpp (original)
+++ sandbox/big_number/libs/multiprecision/test/math/test_carlson.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -1,12 +1,7 @@
 ///////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2002 - 2011.
 // Copyright 2011 John Maddock. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
-//
-// This work is based on an earlier work:
-// "Algorithm 910: A Portable C++ Multiple-Precision System for Special-Function Calculations",
-// in ACM TOMS, {VOL 37, ISSUE 4, (February 2011)} (C) ACM, 2011. http://doi.acm.org/10.1145/1916461.1916469
 
 #ifdef _MSC_VER
 # define _SCL_SECURE_NO_WARNINGS

Added: sandbox/big_number/libs/multiprecision/test/math/test_cbrt.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_cbrt.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,95 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_cbrt.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 5, 3); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_cbrt(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_cbrt(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_cbrt(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_cbrt(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_cbrt(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_cbrt(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_cbrt(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_cbrt(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_cbrt(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+
+
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_digamma.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_digamma.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,100 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_digamma.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*Negative.*", // test data group
+ ".*", 350, 40); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 80, 30); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_digamma(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_digamma(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_digamma(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_digamma(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_digamma(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_digamma(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_digamma(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_digamma(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_digamma(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ellint_1.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ellint_1.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_ellint_1.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 40, 20); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_spots(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_spots(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_spots(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_spots(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_spots(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_spots(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_spots(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_spots(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_spots(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ellint_2.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ellint_2.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_ellint_2.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 60, 30); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_spots(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_spots(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_spots(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_spots(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_spots(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_spots(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_spots(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_spots(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_spots(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ellint_3.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ellint_3.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,107 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_ellint_3.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", 3000, 500); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*Large.*", // test data group
+ ".*", 75, 40); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 60, 30); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_spots(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_spots(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_spots(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_spots(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_spots(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_spots(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_spots(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_spots(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_spots(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_erf.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_erf.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,114 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_erf.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ "Erf Function:.*", // test data group
+ "boost::math::erfc?", 2200, 1500);// test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ "Inverse Erf.*", // test data group
+ "boost::math::erfc?_inv", 2200, 1500); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ "Erf Function:.*", // test data group
+ "boost::math::erfc?", 300, 200); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ "Inverse Erf.*", // test data group
+ "boost::math::erfc?_inv", 35, 20); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_erf(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_erf(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_erf(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_erf(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_erf(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_erf(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_erf(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_erf(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_erf(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_expint.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_expint.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,114 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_expint.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", 2500, 1500); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*mpfr_float_backend<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", 1000, 500); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*gmp_float.*", // test type(s)
+ ".*", // test data group
+ ".*", 250, 100); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 250, 50); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_expint(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_expint(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_expint(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_expint(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_expint(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_expint(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_expint(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_expint(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_expint(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_gamma.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_gamma.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,128 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_gamma.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ ".*", // test data group
+ "boost::math::tgamma", 4000, 2500); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ "factorials", // test data group
+ "boost::math::tgamma", 70, 25); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ "factorials", // test data group
+ "boost::math::lgamma", 80, 40); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ "near.*", // test data group
+ "boost::math::tgamma", 80, 60); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ "near.*", // test data group
+ "boost::math::lgamma", 10000000, 10000000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ "tgamma1pm1.*", // test data group
+ "boost::math::tgamma1pm1", 1000, 150); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_gamma(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_gamma(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_gamma(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_gamma(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_gamma(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_gamma(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_gamma(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_gamma(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_gamma(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_hermite.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_hermite.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_hermite.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ "boost::math::hermite", 10, 5); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_hermite(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_hermite(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_hermite(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_hermite(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_hermite(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_hermite(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_hermite(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_hermite(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_hermite(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ibeta.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,117 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#define TEST_DATA 1
+
+#include "libs/math/test/test_ibeta.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ "(?i).*small.*", // test data group
+ ".*", 3000, 1000); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*small.*", // test data group
+ ".*", 90, 25); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*medium.*", // test data group
+ ".*", 150, 50); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*large.*", // test data group
+ ".*", 5000, 500); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_beta(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_beta(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_beta(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_beta(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_beta(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_beta(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_beta(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_beta(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_beta(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_2.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_2.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,124 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#define TEST_DATA 2
+
+#include "libs/math/test/test_ibeta.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ "(?i).*medium.*", // test data group
+ ".*", 4000, 1000); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*mpfr_float_backend<18>.*", // test type(s)
+ "(?i).*medium.*", // test data group
+ ".*", 20000, 1000); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*small.*", // test data group
+ ".*", 90, 25); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*medium.*", // test data group
+ ".*", 200, 50); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*large.*", // test data group
+ ".*", 5000, 500); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_beta(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_beta(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_beta(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_beta(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_beta(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_beta(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_beta(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_beta(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_beta(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_3.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_3.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,110 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#define TEST_DATA 3
+
+#include "libs/math/test/test_ibeta.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*small.*", // test data group
+ ".*", 90, 25); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*medium.*", // test data group
+ ".*", 200, 50); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*large.*", // test data group
+ ".*", 6000000, 500000); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_beta(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_beta(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_beta(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_beta(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_beta(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_beta(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_beta(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_beta(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_beta(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_4.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_4.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,117 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#define TEST_DATA 4
+
+#include "libs/math/test/test_ibeta.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*small.*", // test data group
+ ".*", 4000, 1000); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*small.*", // test data group
+ ".*", 90, 25); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*medium.*", // test data group
+ ".*", 200, 50); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "[^|]*", // platform
+ ".*", // test type(s)
+ "(?i).*large.*", // test data group
+ ".*", 5000, 500); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_beta(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_beta(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_beta(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_beta(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_beta(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_beta(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_beta(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_beta(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_beta(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_1.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_1.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,96 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#define TEST_DATA 4
+
+#include "libs/math/test/test_ibeta_inv.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 1000000, 100000); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ //test_beta(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_beta(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_beta(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_beta(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_beta(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_beta(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_beta(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_beta(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_beta(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,96 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#define TEST_DATA 4
+#define FULL_TEST
+
+#include "libs/math/test/test_ibeta_inv_ab.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 1000, 100); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ //test_beta(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_beta(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_beta(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_beta(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_beta(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_beta(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_beta(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_beta(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_beta(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_igamma.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_igamma.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,100 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+
+#include "libs/math/test/test_igamma.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*large.*", // test data group
+ ".*", 20000000L, 1000000L); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 7000, 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_gamma(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_gamma(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_gamma(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_gamma(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_gamma(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_gamma(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_gamma(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_gamma(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_gamma(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_igamma_inv.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_igamma_inv.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,108 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_igamma_inv.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ ".*small.*", // test data group
+ ".*", 2000000000L, 300000000L); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*small.*", // test data group
+ ".*", 10000000L, 2000000L); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 7000, 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_gamma(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_gamma(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_gamma(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_gamma(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_gamma(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_gamma(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_gamma(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_gamma(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_gamma(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_igamma_inva.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_igamma_inva.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,94 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+#define BOOST_MATH_SMALL_CONSTANT(x) x
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_igamma_inva.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 7000, 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_gamma(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_gamma(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_gamma(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_gamma(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_gamma(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_gamma(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_gamma(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_gamma(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_gamma(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_laguerre.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_laguerre.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_laguerre.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 7000, 500); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_laguerre(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_laguerre(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_laguerre(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_laguerre(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_laguerre(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_laguerre(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_laguerre(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_laguerre(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_laguerre(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_legendre.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_legendre.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_legendre.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 5000, 500); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_legendre_p(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_legendre_p(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_legendre_p(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_legendre_p(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_legendre_p(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_legendre_p(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_legendre_p(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_legendre_p(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_legendre_p(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_tgamma_ratio.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_tgamma_ratio.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,100 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_tgamma_ratio.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*gmp_float<18>.*", // test type(s)
+ ".*", // test data group
+ ".*", 4000, 2000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 1000, 200); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_tgamma_ratio(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_tgamma_ratio(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_tgamma_ratio(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_tgamma_ratio(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_tgamma_ratio(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_tgamma_ratio(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_tgamma_ratio(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_tgamma_ratio(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_tgamma_ratio(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+

Added: sandbox/big_number/libs/multiprecision/test/math/test_zeta.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/math/test_zeta.cpp 2011-12-20 11:19:55 EST (Tue, 20 Dec 2011)
@@ -0,0 +1,100 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifdef _MSC_VER
+# define _SCL_SECURE_NO_WARNINGS
+#endif
+
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
+
+#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_FLOAT) && !defined(TEST_MPFR_50)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_FLOAT
+
+#ifdef _MSC_VER
+#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
+#endif
+#ifdef __GNUC__
+#pragma warning "CAUTION!!: No backend type specified so testing everything.... this will take some time!!"
+#endif
+
+#endif
+
+#if defined(TEST_MPF_50)
+#include <boost/multiprecision/gmp.hpp>
+#endif
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+#endif
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_architypes.hpp>
+#endif
+#ifdef TEST_CPP_FLOAT
+#include <boost/multiprecision/cpp_float.hpp>
+#endif
+
+#define SC_(x) T(BOOST_STRINGIZE(x))
+#define TEST_UDT
+
+#include "libs/math/test/test_zeta.hpp"
+
+void expected_results()
+{
+ //
+ // Define the max and mean errors expected for
+ // various compilers and platforms.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*Random values less than 1", // test data group
+ ".*", 5000, 2000); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ ".*", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 1000, 200); // 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.
+ //
+ std::cout << "Tests run with " << BOOST_COMPILER << ", "
+ << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
+}
+
+
+int test_main(int, char* [])
+{
+ using namespace boost::multiprecision;
+ expected_results();
+ //
+ // Test at:
+ // 18 decimal digits: tests 80-bit long double approximations
+ // 30 decimal digits: tests 128-bit long double approximations
+ // 35 decimal digits: tests arbitrary precision code
+ //
+#ifdef TEST_MPF_50
+ test_zeta(mp_number<gmp_float<18> >(), "mp_number<gmp_float<18> >");
+ test_zeta(mp_number<gmp_float<30> >(), "mp_number<gmp_float<30> >");
+ test_zeta(mp_number<gmp_float<35> >(), "mp_number<gmp_float<35> >");
+#endif
+#ifdef TEST_MPFR_50
+ test_zeta(mp_number<mpfr_float_backend<18> >(), "mp_number<mpfr_float_backend<18> >");
+ test_zeta(mp_number<mpfr_float_backend<30> >(), "mp_number<mpfr_float_backend<30> >");
+ test_zeta(mp_number<mpfr_float_backend<35> >(), "mp_number<mpfr_float_backend<35> >");
+#endif
+#ifdef TEST_CPP_FLOAT
+ test_zeta(mp_number<cpp_float<18> >(), "mp_number<cpp_float<18> >");
+ test_zeta(mp_number<cpp_float<30> >(), "mp_number<cpp_float<30> >");
+ test_zeta(mp_number<cpp_float<35> >(), "mp_number<cpp_float<35> >");
+#endif
+ return 0;
+}
+


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