|
Boost-Commit : |
From: john_at_[hidden]
Date: 2007-08-30 06:14:59
Author: johnmaddock
Date: 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
New Revision: 39067
URL: http://svn.boost.org/trac/boost/changeset/39067
Log:
Updated expected results for Mac OS X.
Text files modified:
sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp | 19 +++++++++++++++
sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp | 2
sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp | 4 +-
sandbox/math_toolkit/libs/math/test/test_beta.cpp | 8 +++---
sandbox/math_toolkit/libs/math/test/test_factorials.cpp | 2
sandbox/math_toolkit/libs/math/test/test_gamma.cpp | 4 +-
sandbox/math_toolkit/libs/math/test/test_ibeta.cpp | 10 ++++----
sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp | 10 ++++---
sandbox/math_toolkit/libs/math/test/test_igamma.cpp | 50 ++++++++++++++++++++++++++++++++++++++++
sandbox/math_toolkit/libs/math/test/test_laguerre.cpp | 4 +-
10 files changed, 92 insertions(+), 21 deletions(-)
Modified: sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_i.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -58,6 +58,25 @@
#else
largest_type = "(long\\s+)?double";
#endif
+
+ //
+ // Mac OS has higher error rates, why?
+ //
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
+ largest_type, // test type(s)
+ ".*", // test data group
+ ".*", 100, 50); // test function
+ add_expected_result(
+ ".*", // compiler
+ ".*", // stdlib
+ "Mac OS", // platform
+ "real_concept", // test type(s)
+ ".*", // test data group
+ ".*", 100, 50); // test function
+
add_expected_result(
".*", // compiler
".*", // stdlib
Modified: sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_j.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -116,7 +116,7 @@
"Mac OS", // platform
"double", // test type(s)
".*Tricky.*", // test data group
- ".*", 100000, 100000); // test function
+ ".*", 200000, 200000); // test function
//
Modified: sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_bessel_y.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -91,9 +91,9 @@
".*", // compiler
".*", // stdlib
"Mac OS", // platform
- largest_type, // test type(s)
+ "long double|real_concept", // test type(s)
".*Y[0].*", // test data group
- ".*", 500, 200); // test function
+ ".*", 1200, 1000); // test function
//
// Linux:
Modified: sandbox/math_toolkit/libs/math/test/test_beta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_beta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_beta.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -51,7 +51,7 @@
// Define the max and mean errors expected for
// various compilers and platforms.
//
-
+#if LDBL_MANT_DIG == 106
// Darwin:
add_expected_result(
".*", // compiler
@@ -60,7 +60,7 @@
"(long\\s+)?double", // test type(s)
"Beta Function: Medium.*", // test data group
"boost::math::beta", 200, 35); // test function
-
+#endif
add_expected_result(
".*", // compiler
@@ -89,7 +89,7 @@
".*", // platform
"real_concept", // test type(s)
"Beta Function: Small.*", // test data group
- "boost::math::beta", 15, 6); // test function
+ "boost::math::beta", 15, 15); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
@@ -103,7 +103,7 @@
".*", // platform
"real_concept", // test type(s)
"Beta Function: Divergent.*", // test data group
- "boost::math::beta", 15, 8); // test function
+ "boost::math::beta", 25, 8); // test function
//
// Finish off by printing out the compiler/stdlib/platform names,
Modified: sandbox/math_toolkit/libs/math/test/test_factorials.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_factorials.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_factorials.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -141,7 +141,7 @@
static_cast<T>(-9.76168312768123676601980433377916854311706629232503473758698e26L), tolerance);
BOOST_CHECK_CLOSE(
::boost::math::rising_factorial(static_cast<T>(-30.25), -21),
- static_cast<T>(-1.50079704000923674318934280259377728203516775215430875839823e-34L), tolerance);
+ static_cast<T>(-1.50079704000923674318934280259377728203516775215430875839823e-34L), 2 * tolerance);
BOOST_CHECK_CLOSE(
::boost::math::rising_factorial(static_cast<T>(-30.25), 5),
static_cast<T>(-1.78799177197265625000000e7L), tolerance);
Modified: sandbox/math_toolkit/libs/math/test/test_gamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_gamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_gamma.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -103,7 +103,7 @@
"linux", // platform
largest_type, // test type(s)
"near (1|2|-10)", // test data group
- "boost::math::tgamma", 8, 5); // test function
+ "boost::math::tgamma", 10, 5); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
@@ -208,7 +208,7 @@
".*", // platform
largest_type, // test type(s)
"near (1|2|-10)", // test data group
- "boost::math::tgamma", 8, 5); // test function
+ "boost::math::tgamma", 10, 5); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
Modified: sandbox/math_toolkit/libs/math/test/test_ibeta.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -94,29 +94,29 @@
"(?i).*medium.*", // test data group
".*", 300, 80); // test function
//
- // deficiencies in pow function really kick in here for
+ // Deficiencies in pow function really kick in here for
// large arguments. Note also that the tests here get
// *very* extreme due to the increased exponent range
- // of 80-bit long doubles.
+ // of 80-bit long doubles. Also effect Mac OS.
//
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib
- "linux", // platform
+ "linux|Mac OS", // platform
"double", // test type(s)
"(?i).*large.*", // test data group
".*", 40, 20); // test function
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib
- "linux", // platform
+ "linux|Mac OS", // platform
largest_type, // test type(s)
"(?i).*large.*", // test data group
".*", 200000, 10000); // test function
add_expected_result(
"[^|]*", // compiler
"[^|]*", // stdlib
- "linux", // platform
+ "linux|Mac OS", // platform
"real_concept", // test type(s)
"(?i).*medium.*", // test data group
".*", 350, 100); // test function
Modified: sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_ibeta_inv.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -73,31 +73,33 @@
largest_type = "(long\\s+)?double";
#endif
//
- // Linux,
+ // Linux etc,
// Extended exponent range of long double
// causes more extreme test cases to be executed:
//
+#if LDBL_MANT_DIG == 64
add_expected_result(
".*", // compiler
".*", // stdlib
- "linux", // platform
+ ".*", // platform
"double", // test type(s)
".*", // test data group
".*", 20, 10); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
- "linux", // platform
+ ".*", // platform
"long double", // test type(s)
".*", // test data group
".*", 200000, 100000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
- "linux", // platform
+ ".*", // platform
"real_concept", // test type(s)
".*", // test data group
".*", 5000000L, 500000); // test function
+#endif
//
// MinGW,
// Extended exponent range of long double
Modified: sandbox/math_toolkit/libs/math/test/test_igamma.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_igamma.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_igamma.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -104,6 +104,53 @@
"[^|]*", 600, 200); // test function
//
+ // Mac OS X:
+ // It's not clear why these should be required, but see notes above
+ // about Linux.
+ //
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "Mac OS", // platform
+ largest_type, // test type(s)
+ "[^|]*medium[^|]*", // test data group
+ "[^|]*", 5000, 1000); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "Mac OS", // platform
+ largest_type, // test type(s)
+ "[^|]*small[^|]*", // test data group
+ "[^|]*", 40, 15); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "Mac OS", // platform
+ largest_type, // test type(s)
+ "[^|]*integer[^|]*", // test data group
+ "[^|]*", 2000, 300); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "Mac OS", // platform
+ "real_concept", // test type(s)
+ "[^|]*medium[^|]*", // test data group
+ "[^|]*", 5000, 1000); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "Mac OS", // platform
+ "real_concept", // test type(s)
+ "[^|]*small[^|]*", // test data group
+ "[^|]*", 40, 15); // test function
+ add_expected_result(
+ "[^|]*", // compiler
+ "[^|]*", // stdlib
+ "Mac OS", // platform
+ "real_concept", // test type(s)
+ "[^|]*integer[^|]*", // test data group
+ "[^|]*", 2000, 300); // test function
+ //
// HP-UX:
//
add_expected_result(
@@ -352,6 +399,9 @@
// basic sanity checks, tolerance is 10 epsilon expressed as a percentage:
//
T tolerance = boost::math::tools::epsilon<T>() * 1000;
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && (LDBL_MANT_DIG == 106)
+ tolerance *= 10;
+#endif
BOOST_CHECK_CLOSE(::boost::math::tgamma(static_cast<T>(5), static_cast<T>(1)), static_cast<T>(23.912163676143750903709045060494956383977723517065L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::tgamma(static_cast<T>(5), static_cast<T>(5)), static_cast<T>(10.571838841565097874621959975919877646444998907920L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::tgamma(static_cast<T>(5), static_cast<T>(10)), static_cast<T>(0.70206451384706574414638719662835463671916532623256L), tolerance);
Modified: sandbox/math_toolkit/libs/math/test/test_laguerre.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_laguerre.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_laguerre.cpp 2007-08-30 06:14:57 EDT (Thu, 30 Aug 2007)
@@ -79,14 +79,14 @@
add_expected_result(
".*", // compiler
".*", // stdlib
- "linux.*", // platform
+ "linux.*|Mac OS", // platform
largest_type, // test type(s)
".*", // test data group
".*", 40000, 1000); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
- "linux.*", // platform
+ "linux.*|Mac OS", // platform
"real_concept", // test type(s)
".*", // test data group
".*", 40000, 1000); // test function
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