|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83713 - in trunk: boost/multiprecision libs/multiprecision/config libs/multiprecision/example libs/multiprecision/test libs/multiprecision/test/math
From: john_at_[hidden]
Date: 2013-04-02 13:26:54
Author: johnmaddock
Date: 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
New Revision: 83713
URL: http://svn.boost.org/trac/boost/changeset/83713
Log:
Initial commit of 128-bit float wrapper
Added:
trunk/boost/multiprecision/float128.hpp (contents, props changed)
trunk/libs/multiprecision/test/math/setup.hpp (contents, props changed)
trunk/libs/multiprecision/test/test_arithmetic_float_128.cpp (contents, props changed)
Text files modified:
trunk/libs/multiprecision/config/Jamfile.v2 | 4 ++
trunk/libs/multiprecision/example/floating_point_examples.cpp | 1
trunk/libs/multiprecision/test/Jamfile.v2 | 41 +++++++++++++++++++++++++++
trunk/libs/multiprecision/test/math/log1p_expm1_test.cpp | 55 +-----------------------------------
trunk/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp | 59 ++++-----------------------------------
trunk/libs/multiprecision/test/math/test_bessel_i.cpp | 59 +++++----------------------------------
trunk/libs/multiprecision/test/math/test_bessel_j.cpp | 59 +++++----------------------------------
trunk/libs/multiprecision/test/math/test_bessel_k.cpp | 59 ++++-----------------------------------
trunk/libs/multiprecision/test/math/test_bessel_y.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_beta.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_binomial_coeff.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_carlson.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_cbrt.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_digamma.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_ellint_1.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_ellint_2.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_ellint_3.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_erf.cpp | 58 +++++---------------------------------
trunk/libs/multiprecision/test/math/test_expint.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_gamma.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_hermite.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_ibeta.cpp | 59 +++++----------------------------------
trunk/libs/multiprecision/test/math/test_ibeta_2.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_ibeta_3.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_ibeta_4.cpp | 59 +++++----------------------------------
trunk/libs/multiprecision/test/math/test_ibeta_inv_1.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_igamma.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_igamma_inv.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_igamma_inva.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/math/test_laguerre.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_legendre.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_tgamma_ratio.cpp | 57 ++++---------------------------------
trunk/libs/multiprecision/test/math/test_zeta.cpp | 58 ++++----------------------------------
trunk/libs/multiprecision/test/test_acos.cpp | 9 +++++
trunk/libs/multiprecision/test/test_asin.cpp | 9 +++++
trunk/libs/multiprecision/test/test_atan.cpp | 9 +++++
trunk/libs/multiprecision/test/test_cos.cpp | 9 +++++
trunk/libs/multiprecision/test/test_cosh.cpp | 9 +++++
trunk/libs/multiprecision/test/test_exp.cpp | 11 ++++++
trunk/libs/multiprecision/test/test_float_io.cpp | 10 ++++++
trunk/libs/multiprecision/test/test_fpclassify.cpp | 9 +++++
trunk/libs/multiprecision/test/test_log.cpp | 8 ++++
trunk/libs/multiprecision/test/test_numeric_limits.cpp | 9 +++++
trunk/libs/multiprecision/test/test_pow.cpp | 8 ++++
trunk/libs/multiprecision/test/test_round.cpp | 12 +++++--
trunk/libs/multiprecision/test/test_sin.cpp | 9 +++++
trunk/libs/multiprecision/test/test_sinh.cpp | 9 +++++
trunk/libs/multiprecision/test/test_sqrt.cpp | 9 +++++
trunk/libs/multiprecision/test/test_tan.cpp | 9 +++++
trunk/libs/multiprecision/test/test_tanh.cpp | 9 +++++
51 files changed, 399 insertions(+), 1593 deletions(-)
Added: trunk/boost/multiprecision/float128.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/multiprecision/float128.hpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -0,0 +1,400 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2013 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_
+
+#ifndef BOOST_MP_FLOAT128_HPP
+#define BOOST_MP_FLOAT128_HPP
+
+extern "C" {
+#include <quadmath.h>
+}
+
+#include <boost/multiprecision/number.hpp>
+
+namespace boost{
+namespace multiprecision{
+namespace backends{
+
+struct float128_backend;
+
+}
+
+using backends::float128_backend;
+
+template<>
+struct number_category<backends::float128_backend> : public mpl::int_<number_kind_floating_point> {};
+template<>
+struct number_category<__float128> : public mpl::int_<number_kind_floating_point> {};
+
+typedef number<float128_backend, et_off> float128;
+
+namespace backends{
+
+struct float128_backend
+{
+ typedef mpl::list<signed char, short, int, long, long long> signed_types;
+ typedef mpl::list<unsigned char, unsigned short,
+ unsigned int, unsigned long, unsigned long long> unsigned_types;
+ typedef mpl::list<float, double, long double> float_types;
+ typedef int exponent_type;
+
+private:
+ __float128 m_value;
+public:
+ float128_backend() : m_value(0) {}
+ float128_backend(const float128_backend& o) : m_value(o.m_value) {}
+ float128_backend& operator = (const float128_backend& o)
+ {
+ m_value = o.m_value;
+ return *this;
+ }
+ template <class T>
+ float128_backend(const T& i, const typename enable_if_c<is_convertible<T, __float128>::value>::type* = 0)
+ : m_value(i) {}
+ template <class T>
+ typename enable_if_c<is_arithmetic<T>::value || is_convertible<T, __float128>::value, float128_backend&>::type operator = (const T& i)
+ {
+ m_value = i;
+ return *this;
+ }
+ float128_backend& operator = (const char* s)
+ {
+ char* p_end;
+ m_value = strtoflt128(s, &p_end);
+ if(p_end - s != (std::ptrdiff_t)std::strlen(s))
+ {
+ BOOST_THROW_EXCEPTION(std::runtime_error("Unable to interpret input string as a floating point value"));
+ }
+ return *this;
+ }
+ void swap(float128_backend& o)
+ {
+ std::swap(m_value, o.value());
+ }
+ std::string str(std::streamsize digits, std::ios_base::fmtflags f)const
+ {
+ char buf[100];
+ std::string format = "%";
+ if(f & std::ios_base::showpos)
+ format += "+";
+ if(f & std::ios_base::showpoint)
+ format += "#";
+ format += ".*";
+ if(digits == 0)
+ digits = 36;
+ format += "Q";
+ if(f & std::ios_base::scientific)
+ format += "e";
+ else if(f & std::ios_base::fixed)
+ format += "f";
+ else
+ format += "g";
+
+ int v = quadmath_snprintf (buf, 100, format.c_str(), digits, m_value);
+
+ if((v < 0) || (v >= 99))
+ BOOST_THROW_EXCEPTION(std::runtime_error("Formatting quad-float value failed."));
+ return buf;
+ }
+ void negate()
+ {
+ m_value = -m_value;
+ }
+ int compare(const float128_backend& o)const
+ {
+ return m_value == o.m_value ? 0 : m_value < o.m_value ? -1 : 1;
+ }
+ template <class T>
+ int compare(const T& i)const
+ {
+ return m_value == i ? 0 : m_value < i ? -1 : 1;
+ }
+ __float128& value()
+ {
+ return m_value;
+ }
+ const __float128& value()const
+ {
+ return m_value;
+ }
+};
+
+inline void eval_add(float128_backend& result, const float128_backend& a)
+{
+ result.value() += a.value();
+}
+template <class A>
+inline void eval_add(float128_backend& result, const A& a)
+{
+ result.value() += a;
+}
+inline void eval_subtract(float128_backend& result, const float128_backend& a)
+{
+ result.value() -= a.value();
+}
+template <class A>
+inline void eval_subtract(float128_backend& result, const A& a)
+{
+ result.value() -= a;
+}
+inline void eval_multiply(float128_backend& result, const float128_backend& a)
+{
+ result.value() *= a.value();
+}
+template <class A>
+inline void eval_multiply(float128_backend& result, const A& a)
+{
+ result.value() *= a;
+}
+inline void eval_divide(float128_backend& result, const float128_backend& a)
+{
+ result.value() /= a.value();
+}
+template <class A>
+inline void eval_divide(float128_backend& result, const A& a)
+{
+ result.value() /= a;
+}
+
+inline void eval_add(float128_backend& result, const float128_backend& a, const float128_backend& b)
+{
+ result.value() = a.value() + b.value();
+}
+template <class A>
+inline void eval_add(float128_backend& result, const float128_backend& a, const A& b)
+{
+ result.value() = a.value() + b;
+}
+inline void eval_subtract(float128_backend& result, const float128_backend& a, const float128_backend& b)
+{
+ result.value() = a.value() - b.value();
+}
+template <class A>
+inline void eval_subtract(float128_backend& result, const float128_backend& a, const A& b)
+{
+ result.value() = a.value() - b;
+}
+template <class A>
+inline void eval_subtract(float128_backend& result, const A& a, const float128_backend& b)
+{
+ result.value() = a - b.value();
+}
+inline void eval_multiply(float128_backend& result, const float128_backend& a, const float128_backend& b)
+{
+ result.value() = a.value() * b.value();
+}
+template <class A>
+inline void eval_multiply(float128_backend& result, const float128_backend& a, const A& b)
+{
+ result.value() = a.value() * b;
+}
+inline void eval_divide(float128_backend& result, const float128_backend& a, const float128_backend& b)
+{
+ result.value() = a.value() / b.value();
+}
+
+template <class R>
+inline void eval_convert_to(R* result, const float128_backend& val)
+{
+ *result = static_cast<R>(val.value());
+}
+
+inline void eval_frexp(float128_backend& result, const float128_backend& arg, int* exp)
+{
+ result.value() = frexpq(arg.value(), exp);
+}
+
+inline void eval_ldexp(float128_backend& result, const float128_backend& arg, int exp)
+{
+ result.value() = ldexpq(arg.value(), exp);
+}
+
+inline void eval_floor(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = floorq(arg.value());
+}
+inline void eval_ceil(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = ceilq(arg.value());
+}
+inline void eval_sqrt(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = sqrtq(arg.value());
+}
+inline int eval_fpclassify(const float128_backend& arg)
+{
+ return isnanq(arg.value()) ? FP_NAN : isinfq(arg.value()) ? FP_INFINITE : arg.value() == 0 ? FP_ZERO : FP_NORMAL;
+}
+
+inline void eval_increment(float128_backend& arg)
+{
+ ++arg.value();
+}
+inline void eval_decrement(float128_backend& arg)
+{
+ --arg.value();
+}
+
+/*********************************************************************
+*
+* abs/fabs:
+*
+*********************************************************************/
+
+inline void eval_abs(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = fabsq(arg.value());
+}
+inline void eval_fabs(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = fabsq(arg.value());
+}
+
+/*********************************************************************
+*
+* Floating point functions:
+*
+*********************************************************************/
+
+inline void eval_trunc(float128_backend& result, const float128_backend& arg)
+{
+ if(isnanq(arg.value()) || isinf(arg.value()))
+ {
+ result = boost::math::policies::raise_rounding_error(
+ "boost::multiprecision::trunc<%1%>(%1%)", 0,
+ number<float128_backend, et_off>(arg),
+ number<float128_backend, et_off>(arg),
+ boost::math::policies::policy<>()).backend();
+ return;
+ }
+ result.value() = truncq(arg.value());
+}
+/*
+//
+// This doesn't actually work... rely on our own default version instead.
+//
+inline void eval_round(float128_backend& result, const float128_backend& arg)
+{
+ if(isnanq(arg.value()) || isinf(arg.value()))
+ {
+ result = boost::math::policies::raise_rounding_error(
+ "boost::multiprecision::trunc<%1%>(%1%)", 0,
+ number<float128_backend, et_off>(arg),
+ number<float128_backend, et_off>(arg),
+ boost::math::policies::policy<>()).backend();
+ return;
+ }
+ result.value() = roundq(arg.value());
+}
+*/
+inline void eval_exp(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = expq(arg.value());
+}
+inline void eval_log(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = logq(arg.value());
+}
+inline void eval_log10(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = log10q(arg.value());
+}
+inline void eval_sin(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = sinq(arg.value());
+}
+inline void eval_cos(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = cosq(arg.value());
+}
+inline void eval_tan(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = tanq(arg.value());
+}
+inline void eval_asin(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = asinq(arg.value());
+}
+inline void eval_acos(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = acosq(arg.value());
+}
+inline void eval_atan(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = atanq(arg.value());
+}
+inline void eval_sinh(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = sinhq(arg.value());
+}
+inline void eval_cosh(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = coshq(arg.value());
+}
+inline void eval_tanh(float128_backend& result, const float128_backend& arg)
+{
+ result.value() = tanhq(arg.value());
+}
+inline void eval_fmod(float128_backend& result, const float128_backend& a, const float128_backend& b)
+{
+ result.value() = fmodq(a.value(), b.value());
+}
+inline void eval_pow(float128_backend& result, const float128_backend& a, const float128_backend& b)
+{
+ result.value() = powq(a.value(), b.value());
+}
+inline void eval_atan2(float128_backend& result, const float128_backend& a, const float128_backend& b)
+{
+ result.value() = atan2q(a.value(), b.value());
+}
+
+} // namespace backends
+
+}} // namespaces
+
+namespace std{
+
+template <boost::multiprecision::expression_template_option ExpressionTemplates>
+class numeric_limits<boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> >
+{
+ typedef boost::multiprecision::number<boost::multiprecision::backends::float128_backend, ExpressionTemplates> number_type;
+public:
+ BOOST_STATIC_CONSTEXPR bool is_specialized = true;
+ static number_type (min)() BOOST_NOEXCEPT { return FLT128_MIN; }
+ static number_type (max)() BOOST_NOEXCEPT { return FLT128_MAX; }
+ static number_type lowest() BOOST_NOEXCEPT { return -(max)(); }
+ BOOST_STATIC_CONSTEXPR int digits = FLT128_MANT_DIG;
+ BOOST_STATIC_CONSTEXPR int digits10 = 33;
+ BOOST_STATIC_CONSTEXPR int max_digits10 = 36;
+ BOOST_STATIC_CONSTEXPR bool is_signed = true;
+ BOOST_STATIC_CONSTEXPR bool is_integer = false;
+ BOOST_STATIC_CONSTEXPR bool is_exact = false;
+ BOOST_STATIC_CONSTEXPR int radix = 2;
+ static number_type epsilon() { return FLT128_EPSILON; }
+ static number_type round_error() { return 0; }
+ BOOST_STATIC_CONSTEXPR int min_exponent = FLT128_MIN_EXP;
+ BOOST_STATIC_CONSTEXPR int min_exponent10 = min_exponent * 301L / 1000L;
+ BOOST_STATIC_CONSTEXPR int max_exponent = FLT128_MAX_EXP;
+ BOOST_STATIC_CONSTEXPR int max_exponent10 = max_exponent * 301L / 1000L;
+ BOOST_STATIC_CONSTEXPR bool has_infinity = true;
+ BOOST_STATIC_CONSTEXPR bool has_quiet_NaN = true;
+ BOOST_STATIC_CONSTEXPR bool has_signaling_NaN = false;
+ BOOST_STATIC_CONSTEXPR float_denorm_style has_denorm = denorm_absent;
+ BOOST_STATIC_CONSTEXPR bool has_denorm_loss = false;
+ static number_type infinity() { return 1.0q / 0.0q; }
+ static number_type quiet_NaN() { return number_type("nan"); }
+ static number_type signaling_NaN() { return 0; }
+ static number_type denorm_min() { return 0; }
+ BOOST_STATIC_CONSTEXPR bool is_iec559 = true;
+ BOOST_STATIC_CONSTEXPR bool is_bounded = false;
+ BOOST_STATIC_CONSTEXPR bool is_modulo = false;
+ BOOST_STATIC_CONSTEXPR bool traps = false;
+ BOOST_STATIC_CONSTEXPR bool tinyness_before = false;
+ BOOST_STATIC_CONSTEXPR float_round_style round_style = round_toward_zero;
+};
+
+} // namespace std
+
+
+#endif
Modified: trunk/libs/multiprecision/config/Jamfile.v2
==============================================================================
--- trunk/libs/multiprecision/config/Jamfile.v2 (original)
+++ trunk/libs/multiprecision/config/Jamfile.v2 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -39,6 +39,7 @@
lib gmp ;
lib mpfr ;
lib mpfi ;
+lib quadmath ;
exe has_gmp : has_gmp.cpp gmp :
<include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx ;
@@ -48,8 +49,11 @@
<include>$(mpfr_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx <include>$(gmp_path) ;
obj has_tommath : has_tommath.cpp :
<include>$(tommath_path) ;
+exe has_float128 : has_float128.cpp quadmath ;
explicit has_gmp ;
explicit has_mpfr ;
explicit has_mpfi ;
explicit has_tommath ;
+explicit has_float128 ;
+
Modified: trunk/libs/multiprecision/example/floating_point_examples.cpp
==============================================================================
--- trunk/libs/multiprecision/example/floating_point_examples.cpp (original)
+++ trunk/libs/multiprecision/example/floating_point_examples.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,6 +3,7 @@
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+#include <boost/math/constants/constants.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/math/special_functions/gamma.hpp>
#include <boost/math/special_functions/bessel.hpp>
Modified: trunk/libs/multiprecision/test/Jamfile.v2
==============================================================================
--- trunk/libs/multiprecision/test/Jamfile.v2 (original)
+++ trunk/libs/multiprecision/test/Jamfile.v2 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -47,6 +47,7 @@
lib gmp ;
lib mpfr ;
lib mpfi ;
+lib quadmath ;
if $(tommath_path)
{
@@ -111,6 +112,8 @@
run test_arithmetic_mpfi_50.cpp mpfi mpfr gmp : : : [ check-target-builds ../config//has_mpfi : : <build>no ] ;
+run test_arithmetic_float_128.cpp quadmath : : : [ check-target-builds ../config//has_float128 : : <build>no ] ;
+
run test_numeric_limits.cpp
: # command line
: # input files
@@ -196,6 +199,15 @@
[ check-target-builds ../config//has_mpfi : : <build>no ]
: test_numeric_limits_mpfi_50 ;
+
+run test_numeric_limits.cpp quadmath
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT128
+ [ check-target-builds ../config//has_float128 : : <build>no ]
+ : test_numeric_limits_float128 ;
+
for local source in test_exp.cpp test_log.cpp test_pow.cpp test_sinh.cpp test_sqrt.cpp test_cosh.cpp test_tanh.cpp test_sin.cpp test_cos.cpp test_tan.cpp test_asin.cpp test_acos.cpp test_atan.cpp test_round.cpp test_fpclassify.cpp
{
run $(source) gmp
@@ -225,6 +237,13 @@
: # requirements
<define>TEST_CPP_DEC_FLOAT
: $(source:B)_cpp_dec_float ;
+ run $(source) quadmath
+ : # command line
+ : # input files
+ : # requirements
+ [ check-target-builds ../config//has_float128 : : <build>no ]
+ <define>TEST_FLOAT128
+ : $(source:B)_float128 ;
}
run test_gmp_conversions.cpp gmp
@@ -332,6 +351,15 @@
[ check-target-builds ../config//has_mpfi : : <build>no ]
: test_float_io_mpfi ;
+run test_float_io.cpp quadmath
+ : # command line
+ : # input files
+ : # requirements
+ <define>TEST_FLOAT128
+ release # Otherwise runtime is slow
+ [ check-target-builds ../config//has_float128 : : <build>no ]
+ : test_float_io_float128 ;
+
run test_int_io.cpp $(TOMMATH)
: # command line
: # input files
@@ -467,7 +495,7 @@
: # input files
: # requirements
[ check-target-builds ../config//has_tommath : : <build>no ] ;
-run ../example/floating_point_examples.cpp : : : <toolset>gcc:<cxxflags>-std=c++0x ;
+run ../example/floating_point_examples.cpp : : : <toolset>gcc:<cxxflags>-std=gnu++0x ;
run test_cpp_int_conv.cpp ;
run test_native_integer.cpp ;
@@ -545,6 +573,17 @@
<toolset>msvc:<cxxflags>-bigobj
release
: $(source:B)_cpp_dec_float ;
+ run $(source) quadmath /boost/test//boost_unit_test_framework/<link>static /boost/regex//boost_regex/<link>static
+ : # command line
+ : # input files
+ : # requirements
+ [ check-target-builds ../config//has_float128 : : <build>no ]
+ <optimization>speed
+ <define>TEST_FLOAT128
+ <define>BOOST_ALL_NO_LIB
+ <toolset>msvc:<cxxflags>-bigobj
+ release
+ : $(source:B)_float128 ;
}
}
Modified: trunk/libs/multiprecision/test/math/log1p_expm1_test.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/log1p_expm1_test.cpp (original)
+++ trunk/libs/multiprecision/test/math/log1p_expm1_test.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -8,42 +8,7 @@
// "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
-#endif
-
-#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
-
-#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
-#define BOOST_TEST_MAIN
-#include <boost/test/unit_test.hpp>
-#include <boost/test/floating_point_comparison.hpp>
+#include "setup.hpp"
#include <boost/math/special_functions/log1p.hpp>
#include <boost/math/special_functions/expm1.hpp>
@@ -128,23 +93,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp (original)
+++ trunk/libs/multiprecision/test/math/powm1_sqrtp1m1_test.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -8,41 +8,8 @@
// "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
-#endif
-
-#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
-
-#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
+#include "setup.hpp"
-#define BOOST_TEST_MAIN
-#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/math/special_functions/sqrt1pm1.hpp>
#include <boost/math/special_functions/powm1.hpp>
@@ -108,6 +75,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_powm1_sqrtp1m1(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -119,24 +91,7 @@
// 30 decimal digits triggers Boost.Math's 128-bit long double support.
// 35 decimal digits triggers true arbitrary precision support.
//
-#ifdef TEST_MPF_50
- // We have accuracy issues with gmp_float<18> - maybe in std::exp?? Disabled for now.
- //test_powm1_sqrtp1m1(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_powm1_sqrtp1m1(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_powm1_sqrtp1m1(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_powm1_sqrtp1m1(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_powm1_sqrtp1m1(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_powm1_sqrtp1m1(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_powm1_sqrtp1m1(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_powm1_sqrtp1m1(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_powm1_sqrtp1m1(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_powm1_sqrtp1m1(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_SMALL_TESTS
}
Added: trunk/libs/multiprecision/test/math/setup.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/multiprecision/test/math/setup.hpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -0,0 +1,109 @@
+// Copyright 2013 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_
+
+#ifndef BOOST_MP_MATH_SETUP_HPP
+#define BOOST_MP_MATH_SETUP_HPP
+
+#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_DEC_FLOAT) \
+ && !defined(TEST_MPFR_50) && !defined(TEST_FLOAT128)
+# define TEST_MPF_50
+# define TEST_MPFR_50
+# define TEST_CPP_DEC_FLOAT
+# define TEST_FLOAT128
+
+#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>
+
+#define MPF_TESTS test(number<gmp_float<18> >(), "number<gmp_float<18> >");\
+ test(number<gmp_float<30> >(), "number<gmp_float<30> >");\
+ test(number<gmp_float<35> >(), "number<gmp_float<35> >");\
+ /* there should be at least one test with expression templates off: */ \
+ test(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
+#define MPF_SMALL_TESTS /*test(number<gmp_float<18> >(), "number<gmp_float<18> >");*/\
+ test(number<gmp_float<30> >(), "number<gmp_float<30> >");\
+ test(number<gmp_float<35> >(), "number<gmp_float<35> >");\
+ /* there should be at least one test with expression templates off: */ \
+ test(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
+
+#else
+
+#define MPF_TESTS
+#define MPF_SMALL_TESTS
+
+#endif
+
+#if defined(TEST_MPFR_50)
+#include <boost/multiprecision/mpfr.hpp>
+
+#define MPFR_TESTS test(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");\
+ test(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");\
+ test(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
+
+#else
+
+#define MPFR_TESTS
+
+#endif
+
+#ifdef TEST_BACKEND
+#include <boost/multiprecision/concepts/mp_number_archetypes.hpp>
+#endif
+#ifdef TEST_CPP_DEC_FLOAT
+#include <boost/multiprecision/cpp_dec_float.hpp>
+
+#define CPP_DEC_FLOAT_TESTS test(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");\
+ test(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");\
+ test(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
+
+#else
+
+#define CPP_DEC_FLOAT_TESTS
+
+#endif
+
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+
+#define FLOAT128_TESTS test(float128(), "float128");
+
+#else
+
+#define FLOAT128_TESTS
+
+#endif
+
+#define BOOST_TEST_MAIN
+#include <boost/test/unit_test.hpp>
+#include <boost/test/floating_point_comparison.hpp>
+
+#endif
+
+#define ALL_TESTS \
+ MPF_TESTS\
+ MPFR_TESTS\
+ CPP_DEC_FLOAT_TESTS\
+ FLOAT128_TESTS
+
+#define ALL_SMALL_TESTS\
+ MPF_SMALL_TESTS\
+ MPFR_TESTS\
+ CPP_DEC_FLOAT_TESTS\
+ FLOAT128_TESTS
+
Modified: trunk/libs/multiprecision/test/math/test_bessel_i.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_bessel_i.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_bessel_i.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -8,38 +8,7 @@
// "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
-#endif
-
-#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
-
-#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
+#include "setup.hpp"
#define SC_(x) static_cast<typename table_type<T>::type>(BOOST_STRINGIZE(x))
@@ -74,6 +43,12 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_bessel(t, p);
+}
+
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -86,25 +61,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- // We have accuracy issues with gmp_float<18> - maybe in std::exp?? Disabled for now.
- //test_bessel(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_bessel(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_bessel(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_bessel(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_bessel(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_bessel(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_bessel(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_bessel(number<cpp_dec_float<8> >(), "number<cpp_dec_float<8> >");
- test_bessel(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_bessel(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_bessel(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_SMALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_bessel_j.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_bessel_j.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_bessel_j.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -8,39 +8,7 @@
// "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
-#endif
-
-#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
-
-#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#include <boost/math/special_functions/bessel.hpp>
@@ -117,6 +85,12 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_bessel(t, p);
+}
+
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -128,24 +102,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- // We have accuracy issues with gmp_float<18> - maybe in std::exp?? Disabled for now.
- //test_bessel(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_bessel(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_bessel(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_bessel(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_bessel(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_bessel(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_bessel(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_bessel(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_bessel(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_bessel(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_bessel_k.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_bessel_k.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_bessel_k.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -8,40 +8,7 @@
// "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
-#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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#include <boost/math/special_functions/bessel.hpp>
@@ -90,6 +57,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_bessel(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -101,24 +73,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- // We have accuracy issues with gmp_float<18> - maybe in std::exp?? Disabled for now.
- test_bessel(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_bessel(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_bessel(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_bessel(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_bessel(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_bessel(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_bessel(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_bessel(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_bessel(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_bessel(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_bessel_y.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_bessel_y.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_bessel_y.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -8,39 +8,7 @@
// "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
-#endif
-
-#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
-
-#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#include <boost/math/special_functions/bessel.hpp>
@@ -116,6 +84,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_bessel(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -127,24 +100,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- // We have accuracy issues with gmp_float<18> - our argument reduction in std::sin isn't accurate enough:
- //test_bessel(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_bessel(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_bessel(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_bessel(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_bessel(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_bessel(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_bessel(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_bessel(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_bessel(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_bessel(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_SMALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_beta.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_beta.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_beta.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -8,39 +8,7 @@
// "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
-#endif
-
-#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
-
-#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#include <boost/math/special_functions/beta.hpp>
@@ -102,6 +70,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_beta(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -113,24 +86,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- // We have accuracy issues with gmp_float<18> - our argument reduction in std::sin isn't accurate enough:
- test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_beta(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_beta(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_beta(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_beta(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_beta(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_binomial_coeff.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_binomial_coeff.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_binomial_coeff.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -8,39 +8,7 @@
// "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
-#endif
-
-#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
-
-#if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#include <boost/math/special_functions/binomial.hpp>
@@ -81,6 +49,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_binomial(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -92,24 +65,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- // We have accuracy issues with gmp_float<18> - our argument reduction in std::sin isn't accurate enough:
- test_binomial(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_binomial(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_binomial(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_binomial(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_binomial(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_binomial(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_binomial(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_binomial(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_binomial(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_binomial(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_carlson.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_carlson.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_carlson.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -73,6 +41,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_spots(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -84,24 +57,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- // We have accuracy issues with gmp_float<18> - our argument reduction in std::sin isn't accurate enough:
- test_spots(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_spots(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_spots(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_spots(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_spots(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_spots(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_spots(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_spots(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_spots(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_spots(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_cbrt.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_cbrt.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_cbrt.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -63,6 +31,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_cbrt(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -74,23 +47,7 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_cbrt(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_cbrt(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_cbrt(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_cbrt(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_cbrt(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_cbrt(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_cbrt(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_cbrt(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_cbrt(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_cbrt(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_digamma.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_digamma.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_digamma.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -77,6 +45,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_digamma(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -88,22 +61,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_digamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_digamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_digamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_digamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_digamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_digamma(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_digamma(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_digamma(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_digamma(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_digamma(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ellint_1.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ellint_1.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ellint_1.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -70,6 +38,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_spots(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -81,22 +54,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_spots(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_spots(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_spots(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_spots(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_spots(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_spots(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_spots(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_spots(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_spots(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_spots(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ellint_2.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ellint_2.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ellint_2.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -63,6 +31,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_spots(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -74,22 +47,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_spots(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_spots(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_spots(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_spots(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_spots(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_spots(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_spots(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_spots(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_spots(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_spots(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ellint_3.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ellint_3.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ellint_3.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -84,6 +52,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_spots(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -95,22 +68,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_spots(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_spots(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_spots(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_spots(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_spots(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_spots(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_spots(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_spots(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_spots(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_spots(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_erf.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_erf.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_erf.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -84,6 +52,12 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_erf(t, p);
+}
+
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -95,22 +69,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_erf(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_erf(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_erf(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_erf(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_erf(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_erf(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_erf(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_erf(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_erf(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_erf(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_expint.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_expint.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_expint.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -84,6 +52,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_expint(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -95,22 +68,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_expint(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_expint(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_expint(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_expint(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_expint(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_expint(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_expint(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_expint(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_expint(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_expint(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_gamma.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_gamma.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_gamma.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -98,6 +66,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_gamma(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -109,22 +82,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_gamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_gamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_gamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_gamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_gamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_gamma(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_gamma(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_gamma(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_gamma(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_gamma(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_hermite.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_hermite.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_hermite.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -63,6 +31,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_hermite(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -74,22 +47,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_hermite(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_hermite(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_hermite(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_hermite(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_hermite(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_hermite(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_hermite(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_hermite(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_hermite(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_hermite(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ibeta.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ibeta.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ibeta.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,40 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -94,6 +61,12 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_beta(t, p);
+}
+
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -105,22 +78,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_beta(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_beta(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_beta(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_beta(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_beta(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ibeta_2.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ibeta_2.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ibeta_2.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,40 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -94,6 +61,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_beta(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -105,22 +77,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_beta(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_beta(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_beta(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_beta(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_beta(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ibeta_3.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ibeta_3.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ibeta_3.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,40 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -80,6 +47,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_beta(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -91,22 +63,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_beta(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_beta(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_beta(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_beta(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_beta(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ibeta_4.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ibeta_4.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ibeta_4.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,40 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -87,6 +54,12 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_beta(t, p);
+}
+
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -98,22 +71,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_beta(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_beta(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_beta(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_beta(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_beta(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ibeta_inv_1.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ibeta_inv_1.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ibeta_inv_1.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,40 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -73,6 +40,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_beta(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -84,22 +56,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- //test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_beta(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_beta(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_beta(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_beta(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_beta(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_SMALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_ibeta_inv_ab_4.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -66,6 +34,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_beta(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -77,22 +50,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- //test_beta(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_beta(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_beta(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_beta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_beta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_beta(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_beta(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_beta(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_beta(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_beta(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_igamma.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_igamma.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_igamma.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,40 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#include <boost/math/special_functions/gamma.hpp>
@@ -70,6 +37,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_gamma(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -81,22 +53,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_gamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_gamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_gamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_gamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_gamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_gamma(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_gamma(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_gamma(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_gamma(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_gamma(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_igamma_inv.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_igamma_inv.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_igamma_inv.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,40 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -85,6 +52,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_gamma(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -96,22 +68,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_gamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_gamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_gamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_gamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_gamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_gamma(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_gamma(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_gamma(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_gamma(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_gamma(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_igamma_inva.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_igamma_inva.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_igamma_inva.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,40 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -64,6 +31,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_gamma(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -75,22 +47,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_gamma(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_gamma(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_gamma(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_gamma(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_gamma(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_gamma(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_gamma(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_gamma(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_gamma(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_gamma(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_laguerre.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_laguerre.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_laguerre.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -63,6 +31,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_laguerre(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -74,22 +47,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_laguerre(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_laguerre(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_laguerre(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_laguerre(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_laguerre(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_laguerre(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_laguerre(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_laguerre(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_laguerre(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_laguerre(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_legendre.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_legendre.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_legendre.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -63,6 +31,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_legendre_p(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -74,22 +47,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_legendre_p(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_legendre_p(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_legendre_p(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_legendre_p(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_legendre_p(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_legendre_p(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_legendre_p(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_legendre_p(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_legendre_p(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_legendre_p(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_tgamma_ratio.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_tgamma_ratio.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_tgamma_ratio.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -77,6 +45,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_tgamma_ratio(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -88,22 +61,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_tgamma_ratio(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_tgamma_ratio(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_tgamma_ratio(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_tgamma_ratio(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_tgamma_ratio(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_tgamma_ratio(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_tgamma_ratio(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_tgamma_ratio(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_tgamma_ratio(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_tgamma_ratio(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/math/test_zeta.cpp
==============================================================================
--- trunk/libs/multiprecision/test/math/test_zeta.cpp (original)
+++ trunk/libs/multiprecision/test/math/test_zeta.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -3,39 +3,7 @@
// 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_DEC_FLOAT) && !defined(TEST_MPFR_50)
-# define TEST_MPF_50
-# define TEST_MPFR_50
-# define TEST_CPP_DEC_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_archetypes.hpp>
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
-#include <boost/multiprecision/cpp_dec_float.hpp>
-#endif
-
+#include "setup.hpp"
#include "table_type.hpp"
#define TEST_UDT
@@ -70,6 +38,11 @@
<< BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl;
}
+template <class T>
+void test(T t, const char* p)
+{
+ test_zeta(t, p);
+}
BOOST_AUTO_TEST_CASE( test_main )
{
@@ -82,23 +55,6 @@
// 30 decimal digits: tests 128-bit long double approximations
// 35 decimal digits: tests arbitrary precision code
//
-#ifdef TEST_MPF_50
- test_zeta(number<gmp_float<18> >(), "number<gmp_float<18> >");
- test_zeta(number<gmp_float<30> >(), "number<gmp_float<30> >");
- test_zeta(number<gmp_float<35> >(), "number<gmp_float<35> >");
- // there should be at least one test with expression templates off:
- test_zeta(number<gmp_float<35>, et_off>(), "number<gmp_float<35>, et_off>");
-#endif
-#ifdef TEST_MPFR_50
- test_zeta(number<mpfr_float_backend<18> >(), "number<mpfr_float_backend<18> >");
- test_zeta(number<mpfr_float_backend<30> >(), "number<mpfr_float_backend<30> >");
- test_zeta(number<mpfr_float_backend<35> >(), "number<mpfr_float_backend<35> >");
-#endif
-#ifdef TEST_CPP_DEC_FLOAT
- test_zeta(number<cpp_dec_float<9> >(), "number<cpp_dec_float<9> >");
- test_zeta(number<cpp_dec_float<18> >(), "number<cpp_dec_float<18> >");
- test_zeta(number<cpp_dec_float<30> >(), "number<cpp_dec_float<30> >");
- test_zeta(number<cpp_dec_float<35, long long, std::allocator<void> > >(), "number<cpp_dec_float<35, long long, std::allocator<void> > >");
-#endif
+ ALL_TESTS
}
Modified: trunk/libs/multiprecision/test/test_acos.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_acos.cpp (original)
+++ trunk/libs/multiprecision/test/test_acos.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
# define TEST_MPFI_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -123,6 +127,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Added: trunk/libs/multiprecision/test/test_arithmetic_float_128.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/multiprecision/test/test_arithmetic_float_128.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -0,0 +1,19 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2012 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
+
+#include <boost/multiprecision/float128.hpp>
+
+#include "test_arithmetic.hpp"
+
+int main()
+{
+ test<boost::multiprecision::float128>();
+ return 0;
+}
+
Modified: trunk/libs/multiprecision/test/test_asin.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_asin.cpp (original)
+++ trunk/libs/multiprecision/test/test_asin.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
# define TEST_MPFI_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -122,6 +126,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_atan.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_atan.cpp (original)
+++ trunk/libs/multiprecision/test/test_atan.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
# define TEST_MPFI_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
#ifdef BOOST_MSVC
#pragma warning(disable:4127)
@@ -276,6 +280,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_cos.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_cos.cpp (original)
+++ trunk/libs/multiprecision/test/test_cos.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
# define TEST_MPFI_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -319,6 +323,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_cosh.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_cosh.cpp (original)
+++ trunk/libs/multiprecision/test/test_cosh.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
# define TEST_MPFI_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -161,6 +165,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_exp.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_exp.cpp (original)
+++ trunk/libs/multiprecision/test/test_exp.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,15 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) \
+ && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) \
+ && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
# define TEST_MPFI_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +50,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -204,6 +210,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_float_io.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_float_io.cpp (original)
+++ trunk/libs/multiprecision/test/test_float_io.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -9,11 +9,13 @@
# define _SCL_SECURE_NO_WARNINGS
#endif
-#if !defined(TEST_MPF_50) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR_50) \
+ && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_CPP_DEC_FLOAT
# define TEST_MPFR_50
# define TEST_MPFI_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -36,6 +38,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int.hpp>
@@ -316,6 +321,9 @@
test_round_trip<boost::multiprecision::mpf_float_100>();
*/
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_fpclassify.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_fpclassify.cpp (original)
+++ trunk/libs/multiprecision/test/test_fpclassify.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -14,12 +14,13 @@
#include <boost/math/special_functions/fpclassify.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_MPFI_50
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -45,6 +46,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
#ifdef _MSC_VER
#pragma warning(disable: 4127) // conditional expression is constant
@@ -324,6 +328,9 @@
#ifdef TEST_BACKEND
test<boost::multiprecision::number<boost::multiprecision::concepts::number_backend_float_architype> >();
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_log.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_log.cpp (original)
+++ trunk/libs/multiprecision/test/test_log.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,7 +16,7 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
@@ -48,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -233,6 +236,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_numeric_limits.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_numeric_limits.cpp (original)
+++ trunk/libs/multiprecision/test/test_numeric_limits.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -11,7 +11,7 @@
#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_MPZ) && \
!defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPQ) && \
- !defined(TEST_TOMMATH) && !defined(TEST_CPP_INT) && !defined(TEST_MPFI_50)
+ !defined(TEST_TOMMATH) && !defined(TEST_CPP_INT) && !defined(TEST_MPFI_50) &&!defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_MPF
# define TEST_BACKEND
@@ -23,6 +23,7 @@
# define TEST_TOMMATH
# define TEST_CPP_INT
# define TEST_MPFI_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -54,6 +55,9 @@
#ifdef TEST_CPP_INT
#include <boost/multiprecision/cpp_int.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
#ifdef BOOST_MSVC
#pragma warning(disable:4127)
@@ -254,6 +258,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<200, 200, boost::multiprecision::unsigned_magnitude, boost::multiprecision::checked, void> > >();
test<boost::multiprecision::number<boost::multiprecision::cpp_int_backend<70, 70, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void> > >();
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_pow.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_pow.cpp (original)
+++ trunk/libs/multiprecision/test/test_pow.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,7 +16,7 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
//# define TEST_MPF
# define TEST_BACKEND
@@ -48,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -607,6 +610,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_round.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_round.cpp (original)
+++ trunk/libs/multiprecision/test/test_round.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -15,12 +15,13 @@
#include <boost/random/mersenne_twister.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_MPFI_50
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -46,6 +47,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
#ifdef BOOST_MSVC
#pragma warning(disable:4127)
@@ -433,10 +437,10 @@
#ifdef TEST_BACKEND
test<boost::multiprecision::number<boost::multiprecision::concepts::number_backend_float_architype> >();
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
-
-
-
Modified: trunk/libs/multiprecision/test/test_sin.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_sin.cpp (original)
+++ trunk/libs/multiprecision/test/test_sin.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_MPFI_50
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -316,6 +320,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_sinh.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_sinh.cpp (original)
+++ trunk/libs/multiprecision/test/test_sinh.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_MPFI_50
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -240,6 +244,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_sqrt.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_sqrt.cpp (original)
+++ trunk/libs/multiprecision/test/test_sqrt.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_MPFI_50
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -212,6 +216,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<1000> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_tan.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_tan.cpp (original)
+++ trunk/libs/multiprecision/test/test_tan.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_MPFI_50
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
# define TEST_MPFR_50
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -613,6 +617,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
Modified: trunk/libs/multiprecision/test/test_tanh.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_tanh.cpp (original)
+++ trunk/libs/multiprecision/test/test_tanh.cpp 2013-04-02 13:26:48 EDT (Tue, 02 Apr 2013)
@@ -16,12 +16,13 @@
#include <boost/array.hpp>
#include "test.hpp"
-#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50)
+#if !defined(TEST_MPF_50) && !defined(TEST_MPF) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) && !defined(TEST_MPFR) && !defined(TEST_MPFR_50) && !defined(TEST_MPFI_50) && !defined(TEST_FLOAT128)
# define TEST_MPF_50
# define TEST_MPFR_50
# define TEST_MPFI_50
# define TEST_BACKEND
# define TEST_CPP_DEC_FLOAT
+# define TEST_FLOAT128
#ifdef _MSC_VER
#pragma message("CAUTION!!: No backend type specified so testing everything.... this will take some time!!")
@@ -47,6 +48,9 @@
#ifdef TEST_CPP_DEC_FLOAT
#include <boost/multiprecision/cpp_dec_float.hpp>
#endif
+#ifdef TEST_FLOAT128
+#include <boost/multiprecision/float128.hpp>
+#endif
template <class T>
void test()
@@ -156,6 +160,9 @@
test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
#endif
#endif
+#ifdef TEST_FLOAT128
+ test<boost::multiprecision::float128>();
+#endif
return boost::report_errors();
}
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