$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r78107 - in trunk: boost/math boost/math/tools libs/math/doc/sf_and_dist libs/math/test
From: john_at_[hidden]
Date: 2012-04-21 04:43:09
Author: johnmaddock
Date: 2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
New Revision: 78107
URL: http://svn.boost.org/trac/boost/changeset/78107
Log:
Fix double-definition of float_t in tr1.hpp.
Tweak behaviour of BOOST_MATH_BIG_CONSTANT.
Fix expected error rates for a bunch of tests (mostly on Mingw).
Fix paths in owens_t.qbk.
Text files modified: 
   trunk/boost/math/tools/big_constant.hpp           |     5 ++++-                                   
   trunk/boost/math/tr1.hpp                          |     2 ++                                      
   trunk/libs/math/doc/sf_and_dist/owens_t.qbk       |     5 +++--                                   
   trunk/libs/math/test/complex_test.cpp             |     9 ++++-----                               
   trunk/libs/math/test/pow_test.cpp                 |     2 +-                                      
   trunk/libs/math/test/test_bessel_i.cpp            |     7 +++++++                                 
   trunk/libs/math/test/test_bessel_k.cpp            |     7 +++++++                                 
   trunk/libs/math/test/test_bessel_y.cpp            |    12 ++++++------                            
   trunk/libs/math/test/test_expint.cpp              |     2 +-                                      
   trunk/libs/math/test/test_gamma.cpp               |    25 ++++++++++++++++++++++++-               
   trunk/libs/math/test/test_ibeta.cpp               |    17 ++++++++++++-----                       
   trunk/libs/math/test/test_ibeta_inv.cpp           |     8 ++++----                                
   trunk/libs/math/test/test_igamma.cpp              |    32 ++++++++++++++++++++++++++++++++        
   trunk/libs/math/test/test_laguerre.cpp            |     8 ++++----                                
   trunk/libs/math/test/test_long_double_support.cpp |     7 +------                                 
   trunk/libs/math/test/test_signed_zero.cpp         |    10 ++++++++--                              
   16 files changed, 120 insertions(+), 38 deletions(-)
Modified: trunk/boost/math/tools/big_constant.hpp
==============================================================================
--- trunk/boost/math/tools/big_constant.hpp	(original)
+++ trunk/boost/math/tools/big_constant.hpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -41,7 +41,10 @@
    boost::math::tools::make_big_value<T>(\
       BOOST_JOIN(x, L), \
       BOOST_STRINGIZE(x), \
-      mpl::bool_< (D <= std::numeric_limits<long double>::digits) || (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= std::numeric_limits<long double>::digits)) >(), \
+      mpl::bool_< (D <= std::numeric_limits<long double>::digits) \
+          || is_floating_point<T>::value \
+          || (std::numeric_limits<T>::is_specialized && \
+             (std::numeric_limits<T>::digits10 <= std::numeric_limits<long double>::digits10)) >(), \
       boost::is_convertible<const char*, T>())
 //
 // For constants too huge for any conceivable long double (and which generate compiler errors if we try and declare them as such):
Modified: trunk/boost/math/tr1.hpp
==============================================================================
--- trunk/boost/math/tr1.hpp	(original)
+++ trunk/boost/math/tr1.hpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -104,6 +104,7 @@
 #  include <boost/config/auto_link.hpp>
 #endif
 
+#if !(defined(BOOST_INTEL) && defined(__APPLE__)) && !(defined(__FLT_EVAL_METHOD__) && !defined(__cplusplus))
 #ifndef FLT_EVAL_METHOD
 typedef float float_t;
 typedef double double_t;
@@ -117,6 +118,7 @@
 typedef long double float_t;
 typedef long double double_t;
 #endif
+#endif
 
 // C99 Functions:
 double BOOST_MATH_TR1_DECL boost_acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
Modified: trunk/libs/math/doc/sf_and_dist/owens_t.qbk
==============================================================================
--- trunk/libs/math/doc/sf_and_dist/owens_t.qbk	(original)
+++ trunk/libs/math/doc/sf_and_dist/owens_t.qbk	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -26,7 +26,7 @@
 
 [sixemspace][sixemspace][equation owens_t]
 
-[$plot_owens_t.png]
+[$../graphs/plot_owens_t.png]
 
 The function `owens_t(h, a)` gives the probability
 of the event ['(X > h and 0 < Y < a * X)],
@@ -43,7 +43,7 @@
 
 and is also illustrated by a 3D plot.
 
-[$plot_owens_3d_xyp.png]
+[$../graphs/plot_owens_3d_xyp.png]
 
 This function is used in the computation of the __skew_normal_distrib.
 It is also used in the computation of bivariate and
@@ -110,3 +110,4 @@
   http://www.boost.org/LICENSE_1_0.txt).
 ]
 
+
Modified: trunk/libs/math/test/complex_test.cpp
==============================================================================
--- trunk/libs/math/test/complex_test.cpp	(original)
+++ trunk/libs/math/test/complex_test.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -271,11 +271,10 @@
    static const T zero = 0;
    static const T mzero = -zero;
    static const T one = 1;
-   static const T pi = static_cast<T>(3.141592653589793238462643383279502884197L);
-   static const T half_pi = static_cast<T>(1.57079632679489661923132169163975144L);
-   static const T quarter_pi = static_cast<T>(0.78539816339744830961566084581987572L);
-   static const T three_quarter_pi = static_cast<T>(2.35619449019234492884698253745962716L);
-   //static const T log_two = static_cast<T>(0.69314718055994530941723212145817657L);
+   static const T pi = boost::math::constants::pi<T>();
+   static const T half_pi = boost::math::constants::half_pi<T>();
+   static const T quarter_pi = half_pi / 2;
+   static const T three_quarter_pi = boost::math::constants::three_quarters_pi<T>();
    T infinity = std::numeric_limits<T>::infinity();
    bool test_infinity = std::numeric_limits<T>::has_infinity;
    T nan = 0;
Modified: trunk/libs/math/test/pow_test.cpp
==============================================================================
--- trunk/libs/math/test/pow_test.cpp	(original)
+++ trunk/libs/math/test/pow_test.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -41,7 +41,7 @@
     {
        BOOST_CHECK_CLOSE(math::pow<N>(base),
               pow(static_cast<result_type>(base), static_cast<result_type>(N)),
-              boost::math::tools::epsilon<result_type>() * 100 * 200); // 200 eps as a %
+              boost::math::tools::epsilon<result_type>() * 100 * 400); // 400 eps as a %
     }
 }
 
Modified: trunk/libs/math/test/test_bessel_i.cpp
==============================================================================
--- trunk/libs/math/test/test_bessel_i.cpp	(original)
+++ trunk/libs/math/test/test_bessel_i.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -75,6 +75,13 @@
       ".*", 400, 200);               // test function
 
    add_expected_result(
+      "GNU.*",                          // compiler
+      ".*",                          // stdlib
+      "Win32.*",                          // platform
+      largest_type,                  // test type(s)
+      ".*",                          // test data group
+      ".*", 30, 10);                 // test function
+   add_expected_result(
       ".*",                          // compiler
       ".*",                          // stdlib
       ".*",                          // platform
Modified: trunk/libs/math/test/test_bessel_k.cpp
==============================================================================
--- trunk/libs/math/test/test_bessel_k.cpp	(original)
+++ trunk/libs/math/test/test_bessel_k.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -73,6 +73,13 @@
       ".*", 4000, 1300);             // test function
 
    add_expected_result(
+      "GNU.*",                          // compiler
+      ".*",                          // stdlib
+      "Win32.*",                          // platform
+      largest_type,                  // test type(s)
+      ".*large.*",                   // test data group
+      ".*", 250, 100);                 // test function
+   add_expected_result(
       ".*",                          // compiler
       ".*",                          // stdlib
       ".*",                          // platform
Modified: trunk/libs/math/test/test_bessel_y.cpp
==============================================================================
--- trunk/libs/math/test/test_bessel_y.cpp	(original)
+++ trunk/libs/math/test/test_bessel_y.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -131,23 +131,23 @@
    // MinGW:
    //
       add_expected_result(
-         ".*mingw.*",                          // compiler
+         "GNU.*",                          // compiler
          ".*",                          // stdlib
-         ".*",                          // platform
+         "Win32.*",                          // platform
          largest_type,                  // test type(s)
          ".*Yv.*Random.*",              // test data group
          ".*", 200000, 200000);         // test function
       add_expected_result(
-         ".*mingw.*",                          // compiler
+         "GNU.*",                          // compiler
          ".*",                          // stdlib
-         ".*",                          // platform
+         "Win32.*",                          // platform
          largest_type,                  // test type(s)
          ".*Y[01v].*",              // test data group
          ".*", 2000, 1000);         // test function
       add_expected_result(
-         ".*mingw.*",                          // compiler
+         "GNU.*",                          // compiler
          ".*",                          // stdlib
-         ".*",                          // platform
+         "Win32.*",                          // platform
          largest_type,                  // test type(s)
          ".*Yn.*",              // test data group
          ".*", 30000, 30000);         // test function
Modified: trunk/libs/math/test/test_expint.cpp
==============================================================================
--- trunk/libs/math/test/test_expint.cpp	(original)
+++ trunk/libs/math/test/test_expint.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -67,7 +67,7 @@
       ".*",                          // compiler
       ".*",                          // stdlib
       "Mac OS",                      // platform
-      "float|double|long double",    // test type(s)
+      "float|double|long double|real_concept",    // test type(s)
       ".*Ei.*",                      // test data group
       ".*", 300, 200);                   // test function
    add_expected_result(
Modified: trunk/libs/math/test/test_gamma.cpp
==============================================================================
--- trunk/libs/math/test/test_gamma.cpp	(original)
+++ trunk/libs/math/test/test_gamma.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -60,7 +60,30 @@
       largest_type,                  // test type(s)
       "factorials",                  // test data group
       "boost::math::tgamma", 100, 15); // test function
-
+   //
+   // G++ On Win32:
+   //
+   add_expected_result(
+      "GNU.*",                          // compiler
+      ".*",                          // stdlib
+      "Win32.*",                      // platform
+      largest_type,                  // test type(s)
+      "factorials",                  // test data group
+      "boost::math::tgamma", 100, 15); // test function
+   add_expected_result(
+      "GNU.*",                          // compiler
+      ".*",                          // stdlib
+      "Win32.*",                          // platform
+      "real_concept",                // test type(s)
+      "factorials",                  // test data group
+      "boost::math::tgamma", 200, 100);  // test function
+   add_expected_result(
+      "GNU.*",                          // compiler
+      ".*",                          // stdlib
+      "Win32.*",                          // platform
+      "real_concept",                // test type(s)
+      "near.*",                      // test data group
+      "boost::math::tgamma", 200, 60);  // test function
    //
    // G++ on Linux, result vary a bit by processor type,
    // on Itanium results are *much* better than listed here,
Modified: trunk/libs/math/test/test_ibeta.cpp
==============================================================================
--- trunk/libs/math/test/test_ibeta.cpp	(original)
+++ trunk/libs/math/test/test_ibeta.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -182,16 +182,23 @@
    // MinGW:
    //
    add_expected_result(
-      "[^|]*mingw[^|]*",                          // compiler
+      "GNU[^|]*",                          // compiler
       "[^|]*",                          // stdlib
-      ".*",                          // platform
+      "Win32[^|]*",                          // platform
+      "real_concept",                   // test type(s)
+      "(?i).*medium.*",                     // test data group
+      ".*", 400, 50);  // test function
+   add_expected_result(
+      "GNU.*",                          // compiler
+      ".*",                          // stdlib
+      "Win32.*",                          // platform
       "double",                     // test type(s)
       "(?i).*large.*",                      // test data group
       ".*", 20, 10);                 // test function
    add_expected_result(
-      "[^|]*mingw[^|]*",                          // compiler
-      "[^|]*",                          // stdlib
-      ".*",                          // platform
+      "GNU.*",                          // compiler
+      ".*",                          // stdlib
+      "Win32.*",                          // platform
       largest_type,                     // test type(s)
       "(?i).*large.*",                      // test data group
       ".*", 200000, 10000);                 // test function
Modified: trunk/libs/math/test/test_ibeta_inv.cpp
==============================================================================
--- trunk/libs/math/test/test_ibeta_inv.cpp	(original)
+++ trunk/libs/math/test/test_ibeta_inv.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -105,16 +105,16 @@
    // causes more extreme test cases to be executed:
    //
    add_expected_result(
-      ".*mingw.*",                          // compiler
+      "GNU.*",                          // compiler
       ".*",                          // stdlib
-      ".*",                          // platform
+      "Win32.*",                          // platform
       "double",                // test type(s)
       ".*",                          // test data group
       ".*", 10, 10);         // test function
    add_expected_result(
-      ".*mingw.*",                          // compiler
+      "GNU.*",                          // compiler
       ".*",                          // stdlib
-      ".*",                          // platform
+      "Win32.*",                          // platform
       largest_type,                // test type(s)
       ".*",                          // test data group
       ".*", 300000, 20000);         // test function
Modified: trunk/libs/math/test/test_igamma.cpp
==============================================================================
--- trunk/libs/math/test/test_igamma.cpp	(original)
+++ trunk/libs/math/test/test_igamma.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -195,6 +195,38 @@
       "[^|]*", 100, 50);                 // test function
 
    //
+   // Minw:
+   //
+   add_expected_result(
+      "GNU[^|]*",                          // compiler
+      "[^|]*",                          // stdlib
+      "Win32[^|]*",                          // platform
+      largest_type,                     // test type(s)
+      "[^|]*medium[^|]*",               // test data group
+      "[^|]*", 200, 100);                 // test function
+   add_expected_result(
+      "GNU[^|]*",                          // compiler
+      "[^|]*",                          // stdlib
+      "Win32[^|]*",                          // platform
+      largest_type,                     // test type(s)
+      "[^|]*small[^|]*",                // test data group
+      "[^|]*", 100, 50);                  // test function
+   add_expected_result(
+      "GNU[^|]*",                          // compiler
+      "[^|]*",                          // stdlib
+      "Win32[^|]*",                          // platform
+      "real_concept",                   // test type(s)
+      "[^|]*medium[^|]*",               // test data group
+      "[^|]*", 400, 100);                // test function
+   add_expected_result(
+      "GNU[^|]*",                          // compiler
+      "[^|]*",                          // stdlib
+      "Win32[^|]*",                          // platform
+      "real_concept",                   // test type(s)
+      "[^|]*integer[^|]*",              // test data group
+      ".*", 80, 50);                    // test function
+
+   //
    // Large exponent range causes more extreme test cases to be evaluated:
    //
    if(std::numeric_limits<long double>::max_exponent > std::numeric_limits<double>::max_exponent)
Modified: trunk/libs/math/test/test_laguerre.cpp
==============================================================================
--- trunk/libs/math/test/test_laguerre.cpp	(original)
+++ trunk/libs/math/test/test_laguerre.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -82,16 +82,16 @@
       ".*",                          // test data group
       ".*", 40000, 1000);            // test function
    add_expected_result(
-      ".*mingw.*",                   // compiler
+      "GNU.*",                   // compiler
       ".*",                          // stdlib
-      ".*",                          // platform
+      "Win32.*",                          // platform
       largest_type,                  // test type(s)
       ".*",                          // test data group
       ".*", 40000, 1000);            // test function
    add_expected_result(
-      ".*mingw.*",                   // compiler
+      "GNU.*",                   // compiler
       ".*",                          // stdlib
-      ".*",                          // platform
+      "Win32.*",                          // platform
       "real_concept",                // test type(s)
       ".*",                          // test data group
       ".*", 40000, 1000);            // test function
Modified: trunk/libs/math/test/test_long_double_support.cpp
==============================================================================
--- trunk/libs/math/test/test_long_double_support.cpp	(original)
+++ trunk/libs/math/test/test_long_double_support.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -117,18 +117,13 @@
    //
    // TAN:
    //
-   boost::array<boost::array<long double, 2>, 7> tan_test_data = {{
+   boost::array<boost::array<long double, 2>, 6> tan_test_data = {{
        0, 0,
        0.125L, 0.125655136575130967792678218629774000758665763892225542668867L,
        -0.125L, -0.125655136575130967792678218629774000758665763892225542668867L,
        1.125L, 2.09257127637217900442373398123488678225994171614872057291399L,
        1e-500L, 1e-500L,
        1e-1500L, 1e-1500L,
-#if LDBL_MAX_EXP > DBL_MAX_EXP
-       1.57079632679489661923132169163975144209858469968755291048747L, 1e500L,
-#else
-       0, 0,
-#endif
    }};
    unary_proc = std::tan;
    inv_unary_proc = std::atan;
Modified: trunk/libs/math/test/test_signed_zero.cpp
==============================================================================
--- trunk/libs/math/test/test_signed_zero.cpp	(original)
+++ trunk/libs/math/test/test_signed_zero.cpp	2012-04-21 04:43:06 EDT (Sat, 21 Apr 2012)
@@ -210,15 +210,21 @@
    if(precision_after)
    {
     CHECKOUT(std::setprecision(2) << std::showpoint << nz, "-0.00"); // or "-0.0"
-    CHECKOUT(std::scientific << std::showpoint << std::setw(10) << std::setfill('*') << std::setprecision(1) << std::left << nz, "-0.0e+000*"); // -0.0e+00**
     CHECKOUT(std::setw(1) << std::setprecision(3) << std::showpoint << nz, "-0.000"); // Not enough width for precision overflows width.  or "-0.00"
    }
    else
    {
     CHECKOUT(std::setprecision(2) << std::showpoint << nz, "-0.0"); // or "-0.00"
-    CHECKOUT(std::scientific << std::showpoint << std::setw(10) << std::setfill('*') << std::setprecision(1) << std::left << nz, "-0.0e+00**"); // -0.0e+000*
     CHECKOUT(std::setw(1) << std::setprecision(3) << std::showpoint << nz, "-0.00"); // Not enough width for precision overflows width.  or "-0.000"
    }
+   if(triple_exponent)
+   {
+    CHECKOUT(std::scientific << std::showpoint << std::setw(10) << std::setfill('*') << std::setprecision(1) << std::left << nz, "-0.0e+000*"); // -0.0e+00**
+   }
+   else
+   {
+    CHECKOUT(std::scientific << std::showpoint << std::setw(10) << std::setfill('*') << std::setprecision(1) << std::left << nz, "-0.0e+00**"); // -0.0e+000*
+   }
     CHECKOUT(std::fixed << std::showpoint << std::setw(6) << std::setfill('*') << std::setprecision(3) << std::left << 0., "0.000*");
 
     // Non zero values.