Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81710 - in trunk: boost/multiprecision libs/multiprecision/performance libs/multiprecision/test libs/multiprecision/test/concepts
From: john_at_[hidden]
Date: 2012-12-04 14:28:49


Author: johnmaddock
Date: 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
New Revision: 81710
URL: http://svn.boost.org/trac/boost/changeset/81710

Log:
Fix some more GCC warnings and make compiles faster for slow compilers (Intel)
Text files modified:
   trunk/boost/multiprecision/integer.hpp | 27 +++++++++-------
   trunk/libs/multiprecision/performance/arithmetic_backend.hpp | 35 ++++++++++++++-------
   trunk/libs/multiprecision/test/Jamfile.v2 | 63 ++++++++++++++++++++-------------------
   trunk/libs/multiprecision/test/concepts/sf_concept_check_bessel.cpp | 2 +
   trunk/libs/multiprecision/test/concepts/sf_concept_check_gamma.cpp | 2 +
   trunk/libs/multiprecision/test/test_acos.cpp | 2 +
   trunk/libs/multiprecision/test/test_arithmetic.hpp | 24 +++++++-------
   trunk/libs/multiprecision/test/test_asin.cpp | 2 +
   trunk/libs/multiprecision/test/test_atan.cpp | 4 +
   trunk/libs/multiprecision/test/test_cos.cpp | 2 +
   trunk/libs/multiprecision/test/test_cosh.cpp | 2 +
   trunk/libs/multiprecision/test/test_cpp_int.cpp | 4 +
   trunk/libs/multiprecision/test/test_exp.cpp | 2 +
   trunk/libs/multiprecision/test/test_log.cpp | 2 +
   trunk/libs/multiprecision/test/test_pow.cpp | 2 +
   trunk/libs/multiprecision/test/test_round.cpp | 4 +
   trunk/libs/multiprecision/test/test_sin.cpp | 2 +
   trunk/libs/multiprecision/test/test_sinh.cpp | 6 ++-
   trunk/libs/multiprecision/test/test_sqrt.cpp | 2 +
   trunk/libs/multiprecision/test/test_tan.cpp | 2 +
   trunk/libs/multiprecision/test/test_tanh.cpp | 2 +
   21 files changed, 121 insertions(+), 72 deletions(-)

Modified: trunk/boost/multiprecision/integer.hpp
==============================================================================
--- trunk/boost/multiprecision/integer.hpp (original)
+++ trunk/boost/multiprecision/integer.hpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -12,19 +12,19 @@
 namespace multiprecision{
 
 template <class Integer, class I2>
-typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
+typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
    multiply(Integer& result, const I2& a, const I2& b)
 {
    return result = static_cast<Integer>(a) * static_cast<Integer>(b);
 }
 template <class Integer, class I2>
-typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
+typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
    add(Integer& result, const I2& a, const I2& b)
 {
    return result = static_cast<Integer>(a) + static_cast<Integer>(b);
 }
 template <class Integer, class I2>
-typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
+typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
    subtract(Integer& result, const I2& a, const I2& b)
 {
    return result = static_cast<Integer>(a) - static_cast<Integer>(b);
@@ -45,15 +45,15 @@
 
 namespace detail{
 //
-// Figure out the kind of integer that has twice as many bits as some builtin
+// Figure out the kind of integer that has twice as many bits as some builtin
 // integer type I. Use a native type if we can (including types which may not
-// be recognised by boost::int_t because they're larger than long long),
+// be recognised by boost::int_t because they're larger than long long),
 // otherwise synthesize a cpp_int to do the job.
 //
 template <class I>
 struct double_integer
 {
- static const unsigned int_t_digits =
+ static const unsigned int_t_digits =
       2 * sizeof(I) <= sizeof(long long) ? std::numeric_limits<I>::digits * 2 : 1;
 
    typedef typename mpl::if_c<
@@ -103,13 +103,16 @@
 template <class Integer>
 typename enable_if_c<is_integral<Integer>::value, unsigned>::type lsb(const Integer& val)
 {
- if(val == 0)
+ if(val <= 0)
    {
- BOOST_THROW_EXCEPTION(std::range_error("No bits were set in the operand."));
- }
- if(val < 0)
- {
- BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
+ if(val == 0)
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("No bits were set in the operand."));
+ }
+ else
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
+ }
    }
    unsigned index = 0;
    Integer mask = 1;

Modified: trunk/libs/multiprecision/performance/arithmetic_backend.hpp
==============================================================================
--- trunk/libs/multiprecision/performance/arithmetic_backend.hpp (original)
+++ trunk/libs/multiprecision/performance/arithmetic_backend.hpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -100,7 +100,7 @@
    template <class A>
    typename enable_if<is_arithmetic<A>, int>::type compare(A i)const
    {
- return m_value > i ? 1 : (m_value < i ? -1 : 0);
+ return m_value > static_cast<Arithmetic>(i) ? 1 : (m_value < static_cast<Arithmetic>(i) ? -1 : 0);
    }
    Arithmetic& data() { return m_value; }
    const Arithmetic& data()const { return m_value; }
@@ -120,9 +120,9 @@
    return a.data() == b.data();
 }
 template <class Arithmetic, class A2>
-inline bool eval_eq(const arithmetic_backend<Arithmetic>& a, const A2& b)
+inline typename enable_if<is_arithmetic<A2>, bool>::type eval_eq(const arithmetic_backend<Arithmetic>& a, const A2& b)
 {
- return a.data() == b;
+ return a.data() == static_cast<Arithmetic>(b);
 }
 template <class Arithmetic>
 inline bool eval_lt(const arithmetic_backend<Arithmetic>& a, const arithmetic_backend<Arithmetic>& b)
@@ -130,9 +130,9 @@
    return a.data() < b.data();
 }
 template <class Arithmetic, class A2>
-inline bool eval_lt(const arithmetic_backend<Arithmetic>& a, const A2& b)
+inline typename enable_if<is_arithmetic<A2>, bool>::type eval_lt(const arithmetic_backend<Arithmetic>& a, const A2& b)
 {
- return a.data() < b;
+ return a.data() < static_cast<Arithmetic>(b);
 }
 template <class Arithmetic>
 inline bool eval_gt(const arithmetic_backend<Arithmetic>& a, const arithmetic_backend<Arithmetic>& b)
@@ -140,9 +140,9 @@
    return a.data() > b.data();
 }
 template <class Arithmetic, class A2>
-inline bool eval_gt(const arithmetic_backend<Arithmetic>& a, const A2& b)
+inline typename enable_if<is_arithmetic<A2>, bool>::type eval_gt(const arithmetic_backend<Arithmetic>& a, const A2& b)
 {
- return a.data() > b;
+ return a.data() > static_cast<Arithmetic>(b);
 }
 
 template <class Arithmetic>
@@ -189,7 +189,7 @@
    result.data() *= o;
 }
 template <class Arithmetic, class A2>
-inline typename enable_if_c<(is_arithmetic<A2>::value && !std::numeric_limits<Arithmetic>::has_infinity)>::type
+inline typename enable_if_c<(is_arithmetic<A2>::value && !std::numeric_limits<Arithmetic>::has_infinity)>::type
    eval_divide(arithmetic_backend<Arithmetic>& result, const A2& o)
 {
    if(!o)
@@ -197,7 +197,7 @@
    result.data() /= o;
 }
 template <class Arithmetic, class A2>
-inline typename enable_if_c<(is_arithmetic<A2>::value && std::numeric_limits<Arithmetic>::has_infinity)>::type
+inline typename enable_if_c<(is_arithmetic<A2>::value && std::numeric_limits<Arithmetic>::has_infinity)>::type
    eval_divide(arithmetic_backend<Arithmetic>& result, const A2& o)
 {
    result.data() /= o;
@@ -247,7 +247,7 @@
    result.data() = a.data() * b;
 }
 template <class Arithmetic, class A2>
-inline typename enable_if_c<(is_arithmetic<A2>::value && !std::numeric_limits<Arithmetic>::has_infinity)>::type
+inline typename enable_if_c<(is_arithmetic<A2>::value && !std::numeric_limits<Arithmetic>::has_infinity)>::type
    eval_divide(arithmetic_backend<Arithmetic>& result, const arithmetic_backend<Arithmetic>& a, const A2& b)
 {
    if(!b)
@@ -255,7 +255,7 @@
    result.data() = a.data() / b;
 }
 template <class Arithmetic, class A2>
-inline typename enable_if_c<(is_arithmetic<A2>::value && std::numeric_limits<Arithmetic>::has_infinity)>::type
+inline typename enable_if_c<(is_arithmetic<A2>::value && std::numeric_limits<Arithmetic>::has_infinity)>::type
    eval_divide(arithmetic_backend<Arithmetic>& result, const arithmetic_backend<Arithmetic>& a, const A2& b)
 {
    result.data() = a.data() / b;
@@ -268,10 +268,21 @@
 }
 
 template <class Arithmetic>
-inline int eval_get_sign(const arithmetic_backend<Arithmetic>& val)
+inline typename enable_if_c<
+ (!std::numeric_limits<Arithmetic>::is_specialized
+ || std::numeric_limits<Arithmetic>::is_signed), int>::type
+ eval_get_sign(const arithmetic_backend<Arithmetic>& val)
 {
    return val.data() == 0 ? 0 : val.data() < 0 ? -1 : 1;
 }
+template <class Arithmetic>
+inline typename disable_if_c<
+ (std::numeric_limits<Arithmetic>::is_specialized
+ || std::numeric_limits<Arithmetic>::is_signed), int>::type
+ eval_get_sign(const arithmetic_backend<Arithmetic>& val)
+{
+ return val.data() == 0 ? 0 : 1;
+}
 
 template <class T>
 inline typename enable_if<is_unsigned<T>, T>::type abs(T v) { return v; }

Modified: trunk/libs/multiprecision/test/Jamfile.v2
==============================================================================
--- trunk/libs/multiprecision/test/Jamfile.v2 (original)
+++ trunk/libs/multiprecision/test/Jamfile.v2 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -1,6 +1,6 @@
 # copyright John Maddock 2011
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
 # http://www.boost.org/LICENSE_1_0.txt.
 
 import modules ;
@@ -11,23 +11,24 @@
 local mpfr_path = [ modules.peek : MPFR_PATH ] ;
 local tommath_path = [ modules.peek : TOMMATH_PATH ] ;
 
-project : requirements
- <include>$(gmp_path)
- <include>$(gmp_path)/mpfr
- <include>$(gmp_path)/gmpfrxx
+project : requirements
+ <include>$(gmp_path)
+ <include>$(gmp_path)/mpfr
+ <include>$(gmp_path)/gmpfrxx
    <include>$(mpfr_path)
    <include>$(tommath_path)
- <include>../../..
- <search>$(gmp_path)
- <search>$(mpfr_path)
+ <include>../../..
+ <search>$(gmp_path)
+ <search>$(mpfr_path)
    <search>$(mpfr_path)/build.vc10/lib/Win32/Debug
- <search>$(tommath_path)
+ <search>$(tommath_path)
    # We set these to make it easier to set up and test GMP and MPFR under Win32:
    <toolset>msvc:<runtime-link>static
    <toolset>msvc:<link>static
    <toolset>msvc:<warnings>all
    <toolset>gcc:<cxxflags>-Wall
    <toolset>gcc:<cxxflags>-Wextra
+ <toolset>intel:<define>SLOW_COMPILER
    ;
 
 local enable-specfun = [ MATCH (--enable-specfun) : [ modules.peek : ARGV ] ] ;
@@ -261,49 +262,49 @@
          [ check-target-builds ../config//has_mpfr : : <build>no ]
         : test_tanh_mpfr50 ;
 
-run test_exp.cpp
+run test_exp.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_CPP_DEC_FLOAT
         : test_exp_cpp_dec_float ;
 
-run test_sqrt.cpp
+run test_sqrt.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_CPP_DEC_FLOAT
         : test_sqrt_cpp_dec_float ;
 
-run test_log.cpp
+run test_log.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_CPP_DEC_FLOAT
         : test_log_cpp_dec_float ;
 
-run test_pow.cpp
+run test_pow.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_CPP_DEC_FLOAT
         : test_pow_cpp_dec_float ;
 
-run test_sinh.cpp
+run test_sinh.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_CPP_DEC_FLOAT
         : test_sinh_cpp_dec_float ;
 
-run test_cosh.cpp
+run test_cosh.cpp
         : # command line
         : # input files
         : # requirements
               <define>TEST_CPP_DEC_FLOAT
         : test_cosh_cpp_dec_float ;
 
-run test_tanh.cpp
+run test_tanh.cpp
         : # command line
         : # input files
         : # requirements
@@ -635,7 +636,7 @@
         : # input files
         : # requirements
          [ check-target-builds ../config//has_gmp : : <build>no ]
- release # otherwise runtime is too slow!!
+ release # otherwise runtime is too slow!!
          <define>TEST1
          : test_cpp_int_1
          ;
@@ -645,7 +646,7 @@
         : # input files
         : # requirements
          [ check-target-builds ../config//has_gmp : : <build>no ]
- release # otherwise runtime is too slow!!
+ release # otherwise runtime is too slow!!
          <define>TEST2
          : test_cpp_int_2
          ;
@@ -655,7 +656,7 @@
         : # input files
         : # requirements
          [ check-target-builds ../config//has_gmp : : <build>no ]
- release # otherwise runtime is too slow!!
+ release # otherwise runtime is too slow!!
          <define>TEST3
          : test_cpp_int_3
          ;
@@ -667,7 +668,7 @@
         : # input files
         : # requirements
          [ check-target-builds ../config//has_gmp : : <build>no ]
- release # otherwise runtime is too slow!!
+ release # otherwise runtime is too slow!!
          ;
 
 run test_rational_io.cpp $(TOMMATH)
@@ -700,12 +701,12 @@
         : # command line
         : # input files
         : # requirements
- [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
- [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ]
- [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ]
+ [ check-target-builds ../config//has_gmp : <define>TEST_GMP <source>gmp : ]
+ [ check-target-builds ../config//has_tommath : <define>TEST_TOMMATH <source>$(TOMMATH) : ]
+ [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <source>mpfr : ]
          release # Otherwise runtime is slow
          ;
-
+
 
 run ../example/gmp_snips.cpp gmp
         : # command line
@@ -746,7 +747,7 @@
 compile include_test/gmp_include_test.cpp
               : # requirements
                [ check-target-builds ../config//has_gmp : : <build>no ] ;
-compile include_test/tommath_include_test.cpp
+compile include_test/tommath_include_test.cpp
               : # requirements
                [ check-target-builds ../config//has_tommath : : <build>no ] ;
 compile include_test/cpp_int_include_test.cpp ;
@@ -770,7 +771,7 @@
            : # command line
            : # input files
            : # requirements
- [ check-target-builds ../config//has_mpfr : : <build>no ]
+ [ check-target-builds ../config//has_mpfr : : <build>no ]
             <define>TEST_MPFR_50
             <optimization>speed
             <define>BOOST_ALL_NO_LIB
@@ -781,7 +782,7 @@
            : # command line
            : # input files
            : # requirements
- [ check-target-builds ../config//has_gmp : : <build>no ]
+ [ check-target-builds ../config//has_gmp : : <build>no ]
             <optimization>speed
             <define>TEST_MPF_50
             <define>BOOST_ALL_NO_LIB
@@ -803,10 +804,10 @@
 
 for local source in [ glob compile_fail/*.cpp ]
 {
- compile-fail $(source)
+ compile-fail $(source)
    :
- [ check-target-builds ../config//has_gmp : <define>TEST_GMP <debug-symbols>off : ]
- [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <debug-symbols>off : ]
+ [ check-target-builds ../config//has_gmp : <define>TEST_GMP <debug-symbols>off : ]
+ [ check-target-builds ../config//has_mpfr : <define>TEST_MPFR <debug-symbols>off : ]
    ;
 }
 

Modified: trunk/libs/multiprecision/test/concepts/sf_concept_check_bessel.cpp
==============================================================================
--- trunk/libs/multiprecision/test/concepts/sf_concept_check_bessel.cpp (original)
+++ trunk/libs/multiprecision/test/concepts/sf_concept_check_bessel.cpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -61,6 +61,7 @@
    int i(0);
    boost::math::cyl_neumann(v1, v2);
    boost::math::cyl_neumann(i, v2);
+#ifndef SLOW_COMPILER
    boost::math::cyl_bessel_j(v1, v2);
    boost::math::cyl_bessel_j(i, v2);
    boost::math::cyl_bessel_i(v1, v2);
@@ -75,6 +76,7 @@
    boost::math::airy_bi(v1);
    boost::math::airy_ai_prime(v1);
    boost::math::airy_bi_prime(v1);
+#endif
 }
 
 void foo()

Modified: trunk/libs/multiprecision/test/concepts/sf_concept_check_gamma.cpp
==============================================================================
--- trunk/libs/multiprecision/test/concepts/sf_concept_check_gamma.cpp (original)
+++ trunk/libs/multiprecision/test/concepts/sf_concept_check_gamma.cpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -72,6 +72,7 @@
    boost::math::double_factorial<T>(i);
    boost::math::rising_factorial(v1, i);
    boost::math::falling_factorial(v1, i);
+#ifndef SLOW_COMPILER
    boost::math::tgamma(v1, v2);
    boost::math::tgamma_lower(v1, v2);
    boost::math::gamma_p(v1, v2);
@@ -97,6 +98,7 @@
    boost::math::ibetac_invb(v1, v2, v3);
    boost::math::gamma_p_derivative(v2, v3);
    boost::math::ibeta_derivative(v1, v2, v3);
+#endif
 }
 
 void foo()

Modified: trunk/libs/multiprecision/test/test_acos.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_acos.cpp (original)
+++ trunk/libs/multiprecision/test/test_acos.cpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -103,6 +103,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -113,6 +114,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<59, long long, std::allocator<void> > > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
 #endif
+#endif
    return boost::report_errors();
 }
 

Modified: trunk/libs/multiprecision/test/test_arithmetic.hpp
==============================================================================
--- trunk/libs/multiprecision/test/test_arithmetic.hpp (original)
+++ trunk/libs/multiprecision/test/test_arithmetic.hpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -27,7 +27,7 @@
 
 namespace detail{
 
-template<class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+template<class tag, class Arg1, class Arg2, class Arg3, class Arg4>
 typename boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type
    abs(boost::multiprecision::detail::expression<tag, Arg1, Arg2, Arg3, Arg4> const& v)
 {
@@ -740,13 +740,13 @@
 {
    typedef typename lexical_cast_target_type<Num>::type target_type;
    typedef typename boost::mpl::if_<
- boost::is_convertible<Num, Real>,
- typename boost::mpl::if_c<boost::is_integral<Num>::value && (sizeof(Num) < sizeof(int)), int, Num>::type,
+ boost::is_convertible<Num, Real>,
+ typename boost::mpl::if_c<boost::is_integral<Num>::value && (sizeof(Num) < sizeof(int)), int, Num>::type,
          Real
>::type cast_type;
    typedef typename boost::mpl::if_<
- boost::is_convertible<Num, Real>,
- Num,
+ boost::is_convertible<Num, Real>,
+ Num,
          Real
>::type simple_cast_type;
    std::cout << "Testing mixed arithmetic with type: " << typeid(Real).name() << " and " << typeid(Num).name() << std::endl;
@@ -1025,16 +1025,16 @@
 {
    typedef typename lexical_cast_target_type<Num>::type target_type;
    typedef typename boost::mpl::if_<
- boost::is_convertible<Num, Real>,
- typename boost::mpl::if_c<boost::is_integral<Num>::value && (sizeof(Num) < sizeof(int)), int, Num>::type,
+ boost::is_convertible<Num, Real>,
+ typename boost::mpl::if_c<boost::is_integral<Num>::value && (sizeof(Num) < sizeof(int)), int, Num>::type,
          Real
>::type cast_type;
    typedef typename boost::mpl::if_<
- boost::is_convertible<Num, Real>,
- Num,
+ boost::is_convertible<Num, Real>,
+ Num,
          Real
>::type simple_cast_type;
-
+
    if(std::numeric_limits<Real>::is_specialized && std::numeric_limits<Real>::is_bounded && std::numeric_limits<Real>::digits < std::numeric_limits<Num>::digits)
       return;
 
@@ -1045,7 +1045,7 @@
    Num n3 = 0;
    Num n4 = 20;
    Num n5 = 8;
-
+
    test_comparisons<Real>(n1, n2, boost::is_convertible<Num, Real>());
    test_comparisons<Real>(n1, n3, boost::is_convertible<Num, Real>());
    test_comparisons<Real>(n1, n1, boost::is_convertible<Num, Real>());
@@ -1292,7 +1292,7 @@
 template <class Real>
 void test()
 {
-#ifndef NO_MIXED_OPS
+#if !defined(NO_MIXED_OPS) && !defined(SLOW_COMPILER)
    boost::multiprecision::is_number<Real> tag;
    test_mixed<Real, unsigned char>(tag);
    test_mixed<Real, signed char>(tag);

Modified: trunk/libs/multiprecision/test/test_asin.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_asin.cpp (original)
+++ trunk/libs/multiprecision/test/test_asin.cpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -99,6 +99,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -112,6 +113,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<9> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -227,7 +227,7 @@
       if(err > max_err)
          max_err = err;
    }
-
+
    std::cout << "Max error was: " << max_err << std::endl;
    BOOST_TEST(max_err < 2000);
 }
@@ -249,6 +249,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -262,6 +263,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<9> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -299,6 +299,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -309,6 +310,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<59, long long, std::allocator<void> > > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -141,6 +141,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -151,6 +152,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<59, long long, std::allocator<void> > > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
 #endif
+#endif
    return boost::report_errors();
 }
 

Modified: trunk/libs/multiprecision/test/test_cpp_int.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_cpp_int.cpp (original)
+++ trunk/libs/multiprecision/test/test_cpp_int.cpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -26,7 +26,7 @@
 
    T max_val;
    unsigned digits;
- if(std::numeric_limits<T>::is_bounded && (bits_wanted == std::numeric_limits<T>::digits))
+ if(std::numeric_limits<T>::is_bounded && (bits_wanted == (unsigned)std::numeric_limits<T>::digits))
    {
       max_val = (std::numeric_limits<T>::max)();
       digits = std::numeric_limits<T>::digits;
@@ -359,9 +359,11 @@
 
          t1();
          t2();
+#ifndef SLOW_COMPILER
          t3();
          t4();
          t5();
+#endif
 
          if(last_error_count != (unsigned)boost::detail::test_errors())
          {

Modified: trunk/libs/multiprecision/test/test_exp.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_exp.cpp (original)
+++ trunk/libs/multiprecision/test/test_exp.cpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -181,6 +181,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPILER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -194,6 +195,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<9> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -209,6 +209,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -222,6 +223,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<9> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -584,6 +584,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -597,6 +598,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<9> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -223,7 +223,7 @@
       si = itrunc(static_cast<T>((std::numeric_limits<int>::min)()));
       check_trunc_result(static_cast<T>((std::numeric_limits<int>::min)()), si);
       BOOST_TEST(si == itrunc(static_cast<T>((std::numeric_limits<int>::min)()) + 0));
-
+
       si = iround(static_cast<T>((std::numeric_limits<int>::max)() - 1));
       check_within_half(static_cast<T>((std::numeric_limits<int>::max)() - 1), si);
       si = iround(static_cast<T>((std::numeric_limits<int>::min)() + 1));
@@ -393,6 +393,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -403,6 +404,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<59, long long, std::allocator<void> > > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
 #endif
+#endif
 #ifdef TEST_BACKEND
    test<boost::multiprecision::number<boost::multiprecision::concepts::number_backend_float_architype> >();
 #endif

Modified: trunk/libs/multiprecision/test/test_sin.cpp
==============================================================================
--- trunk/libs/multiprecision/test/test_sin.cpp (original)
+++ trunk/libs/multiprecision/test/test_sin.cpp 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -293,6 +293,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -306,6 +307,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<9> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -121,7 +121,7 @@
          max_err = err;
    }
 
- boost::array<const char*, 50> small_values =
+ boost::array<const char*, 50> small_values =
    {{
       "8.223167319358299807036616344469138485821440027829633696917375433348917938654659351596020080036406671343718039863220496616e-01",
       "2.526123168081683079141251505420579055197542874276608074880949653019810769068593790606537020961198741487692473633089323967e-01",
@@ -172,7 +172,7 @@
       "8.462205082273620453993887243423096955123801934429554813185698344472203995997708879527322555715697860578416576045982358004e-23",
       "2.820735027424540151331295747807698985041267308484077168753311108116374235508697904826049959781116012127075951788533527897e-23",
       "9.402450091415133837770985826025663283470891027171945709804152456669015193736201020401750153196590359525341207466344738924e-24",
- "3.134150030471711279256995275341887761156963675682933328476437810109959425395050019306074135780459168092270327572635795510e-24",
+ "3.134150030471711279256995275341887761156963675682933328476437810109959425395050019306074135780459168092270327572635795510e-24",
    }};
 
    max_err = 0;
@@ -217,6 +217,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -230,6 +231,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<9> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -186,6 +186,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -202,6 +203,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<500> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<1000> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -591,6 +591,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -604,6 +605,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<9> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<18> > >();
 #endif
+#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 2012-12-04 14:28:46 EST (Tue, 04 Dec 2012)
@@ -136,6 +136,7 @@
 #ifdef TEST_CPP_DEC_FLOAT
    test<boost::multiprecision::cpp_dec_float_50>();
    test<boost::multiprecision::cpp_dec_float_100>();
+#ifndef SLOW_COMPLER
    // Some "peculiar" digit counts which stress our code:
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<65> > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<64> > >();
@@ -146,6 +147,7 @@
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<59, long long, std::allocator<void> > > >();
    test<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<58, long long, std::allocator<void> > > >();
 #endif
+#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