Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2008-04-15 13:10:18


Author: johnmaddock
Date: 2008-04-15 13:10:18 EDT (Tue, 15 Apr 2008)
New Revision: 44433
URL: http://svn.boost.org/trac/boost/changeset/44433

Log:
Fix error rates on Mac OS X.
Fix long double support for pow_test.cpp.
Text files modified:
   trunk/libs/math/test/pow_test.cpp | 2 ++
   trunk/libs/math/test/test_expint.cpp | 30 ++++++++++++++++++++++++++++++
   trunk/libs/math/test/test_nc_chi_squared.cpp | 7 +++++++
   3 files changed, 39 insertions(+), 0 deletions(-)

Modified: trunk/libs/math/test/pow_test.cpp
==============================================================================
--- trunk/libs/math/test/pow_test.cpp (original)
+++ trunk/libs/math/test/pow_test.cpp 2008-04-15 13:10:18 EDT (Tue, 15 Apr 2008)
@@ -106,7 +106,9 @@
     BOOST_STATIC_ASSERT((is_same<BOOST_TYPEOF(pow<2>(5ul)), double>::value));
     BOOST_STATIC_ASSERT((is_same<BOOST_TYPEOF(pow<2>(6.0f)), float>::value));
     BOOST_STATIC_ASSERT((is_same<BOOST_TYPEOF(pow<2>(7.0)), double>::value));
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
     BOOST_STATIC_ASSERT((is_same<BOOST_TYPEOF(pow<2>(7.0l)), long double>::value));
+#endif
 };
 
 

Modified: trunk/libs/math/test/test_expint.cpp
==============================================================================
--- trunk/libs/math/test/test_expint.cpp (original)
+++ trunk/libs/math/test/test_expint.cpp 2008-04-15 13:10:18 EDT (Tue, 15 Apr 2008)
@@ -60,6 +60,36 @@
    largest_type = "(long\\s+)?double";
 #endif
 
+ //
+ // On MacOS X erfc has much higher error levels than
+ // expected: given that the implementation is basically
+ // just a rational function evaluation combined with
+ // exponentiation, we conclude that exp and pow are less
+ // accurate on this platform, especially when the result
+ // is outside the range of a double.
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
+ "float|double|long double", // test type(s)
+ ".*E1.*", // test data group
+ ".*", 30, 10); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
+ "float|double|long double", // test type(s)
+ ".*Ei.*", // test data group
+ ".*", 300, 200); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
+ ".*", // test type(s)
+ ".*", // test data group
+ ".*", 40, 15); // test function
+
    add_expected_result(
       ".*", // compiler
       ".*", // stdlib

Modified: trunk/libs/math/test/test_nc_chi_squared.cpp
==============================================================================
--- trunk/libs/math/test/test_nc_chi_squared.cpp (original)
+++ trunk/libs/math/test/test_nc_chi_squared.cpp 2008-04-15 13:10:18 EDT (Tue, 15 Apr 2008)
@@ -80,6 +80,13 @@
    largest_type = "(long\\s+)?double|real_concept";
 #endif
 
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "Mac OS", // platform
+ largest_type, // test type(s)
+ "[^|]*medium[^|]*", // test data group
+ "[^|]*", 550, 100); // test function
    //
    // Catch all cases come last:
    //


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