|
From: John M. <joh...@us...> - 2007-04-11 11:44:48
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22857/libs/math_functions/test Modified Files: Tag: math_toolkit test_bessel_j.cpp test_bessel_y.cpp test_beta.cpp test_gamma.cpp test_ibeta.cpp test_igamma.cpp test_igamma_inv.cpp test_legendre.cpp test_lognormal.cpp test_tgamma_ratio.cpp Log Message: Adjusted Mac OS error levels. Fixed up pareto failures. Added some debugging code to track remaining Mac OS failures. Index: test_beta.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/test_beta.cpp,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -d -r1.1.2.6 -r1.1.2.7 --- test_beta.cpp 2 Sep 2006 15:05:43 -0000 1.1.2.6 +++ test_beta.cpp 11 Apr 2007 11:44:42 -0000 1.1.2.7 @@ -47,6 +47,17 @@ // Define the max and mean errors expected for // various compilers and platforms. // + + // Darwin: + add_expected_result( + ".*", // compiler + ".*", // stdlib + "Mac OS.*", // platform + "(long\\s+)?double", // test type(s) + "Beta Function: Medium.*", // test data group + "boost::math::beta", 200, 35); // test function + + add_expected_result( ".*", // compiler ".*", // stdlib Index: test_legendre.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/Attic/test_legendre.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- test_legendre.cpp 4 Jan 2007 16:20:49 -0000 1.1.2.2 +++ test_legendre.cpp 11 Apr 2007 11:44:43 -0000 1.1.2.3 @@ -119,7 +119,7 @@ ".*", // platform largest_type, // test type(s) "Legendre Polynomials.*Large.*", // test data group - "boost::math::legendre_q", 5000, 500); // test function + "boost::math::legendre_q", 5400, 500); // test function add_expected_result( ".*", // compiler ".*", // stdlib @@ -155,7 +155,7 @@ ".*", // platform "real_concept", // test type(s) "Legendre Polynomials.*Large.*", // test data group - "boost::math::legendre_q", 5000, 500); // test function + "boost::math::legendre_q", 5400, 500); // test function add_expected_result( ".*", // compiler ".*", // stdlib Index: test_igamma_inv.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/Attic/test_igamma_inv.cpp,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -d -r1.1.2.6 -r1.1.2.7 --- test_igamma_inv.cpp 23 Dec 2006 17:28:30 -0000 1.1.2.6 +++ test_igamma_inv.cpp 11 Apr 2007 11:44:43 -0000 1.1.2.7 @@ -127,7 +127,7 @@ "[^|]*", // platform largest_type, // test type(s) "[^|]*small[^|]*", // test data group - "[^|]*", 2000, 500); // test function + "[^|]*", 2100, 500); // test function add_expected_result( "[^|]*", // compiler "[^|]*", // stdlib Index: test_bessel_j.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/Attic/test_bessel_j.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- test_bessel_j.cpp 29 Jan 2007 11:35:10 -0000 1.1.2.2 +++ test_bessel_j.cpp 11 Apr 2007 11:44:42 -0000 1.1.2.3 @@ -91,6 +91,35 @@ ".*", 3000, 500); // test function // + // Mac OS X: + // + add_expected_result( + ".*", // compiler + ".*", // stdlib + "Mac OS", // platform + largest_type, // test type(s) + "Bessel JN.*", // test data group + ".*", 40000, 20000); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + "Mac OS", // platform + largest_type, // test type(s) + "Bessel J:.*", // test data group + ".*", 50000, 20000); // test function + + // This shouldn't be required, could be limited test data precision + // i.e. not enough bits in double input to get double result. + add_expected_result( + ".*", // compiler + ".*", // stdlib + "Mac OS", // platform + "double", // test type(s) + ".*Tricky.*", // test data group + ".*", 100000, 100000); // test function + + + // // Linux specific results: // // sin and cos appear to have only double precision for large Index: test_gamma.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/test_gamma.cpp,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -d -r1.1.2.8 -r1.1.2.9 --- test_gamma.cpp 19 Nov 2006 18:29:05 -0000 1.1.2.8 +++ test_gamma.cpp 11 Apr 2007 11:44:42 -0000 1.1.2.9 @@ -62,6 +62,18 @@ largest_type = "(long\\s+)?double"; #endif // + // G++ on Darwin: results are just slightly worse than we might hope for + // but still pretty good: + // + add_expected_result( + ".*", // compiler + ".*", // stdlib + "Mac OS", // platform + largest_type, // test type(s) + "factorials", // test data group + "boost::math::tgamma", 100, 15); // test function + + // // G++ on Linux, result vary a bit by processor type, // on Itanium results are *much* better than listed here, // but x86 appears to have much less accurate std::pow @@ -228,7 +240,7 @@ ".*", // platform "real_concept", // test type(s) "near.*", // test data group - "boost::math::tgamma", 50, 30); // test function + "boost::math::tgamma", 60, 30); // test function add_expected_result( ".*", // compiler ".*", // stdlib Index: test_bessel_y.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/Attic/test_bessel_y.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -d -r1.1.2.3 -r1.1.2.4 --- test_bessel_y.cpp 6 Feb 2007 13:32:59 -0000 1.1.2.3 +++ test_bessel_y.cpp 11 Apr 2007 11:44:42 -0000 1.1.2.4 @@ -59,7 +59,7 @@ #endif // - // HP-uX rates are very slightly higher: + // HP-UX rates are very slightly higher: // add_expected_result( ".*", // compiler @@ -77,6 +77,24 @@ ".*", 400, 200); // test function // + // Mac OS X rates are very slightly higher: + // + add_expected_result( + ".*", // compiler + ".*", // stdlib + "Mac OS", // platform + largest_type, // test type(s) + ".*(Y[nv1]).*", // test data group + ".*", 600000, 100000); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + "Mac OS", // platform + largest_type, // test type(s) + ".*Y[0].*", // test data group + ".*", 500, 200); // test function + + // // Linux: // add_expected_result( Index: test_lognormal.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/Attic/test_lognormal.cpp,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -d -r1.1.2.4 -r1.1.2.5 --- test_lognormal.cpp 16 Mar 2007 15:16:00 -0000 1.1.2.4 +++ test_lognormal.cpp 11 Apr 2007 11:44:43 -0000 1.1.2.5 @@ -277,9 +277,9 @@ // Test range and support using double only, // because it supports numeric_limits max for a pseudo-infinity. BOOST_CHECK_EQUAL(range(myf2).first, 0); // range 0 to +infinity - BOOST_CHECK_EQUAL(range(myf2).second, numeric_limits<double>::max()); + BOOST_CHECK_EQUAL(range(myf2).second, (std::numeric_limits<double>::max)()); BOOST_CHECK_EQUAL(support(myf2).first, 0); // support 0 to + infinity. - BOOST_CHECK_EQUAL(support(myf2).second, numeric_limits<double>::max()); + BOOST_CHECK_EQUAL(support(myf2).second, (std::numeric_limits<double>::max)()); // Basic sanity-check spot values. Index: test_ibeta.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/test_ibeta.cpp,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -d -r1.1.2.13 -r1.1.2.14 --- test_ibeta.cpp 4 Jan 2007 16:20:49 -0000 1.1.2.13 +++ test_ibeta.cpp 11 Apr 2007 11:44:42 -0000 1.1.2.14 @@ -62,6 +62,17 @@ largest_type = "(long\\s+)?double"; #endif // + // Darwin: just one special case for real_concept: + // + add_expected_result( + "[^|]*", // compiler + "[^|]*", // stdlib + "Mac OS", // platform + "real_concept", // test type(s) + "(?i).*large.*", // test data group + ".*", 400000, 50000); // test function + + // // Linux - results depend quite a bit on the // processor type, and how good the std::pow // function is for that processor. @@ -143,7 +154,7 @@ "[^|]*", // platform largest_type, // test type(s) "(?i).*small.*", // test data group - ".*", 40, 10); // test function + ".*", 60, 10); // test function add_expected_result( "[^|]*", // compiler "[^|]*", // stdlib @@ -165,7 +176,7 @@ "[^|]*", // platform "real_concept", // test type(s) "(?i).*small.*", // test data group - ".*", 40, 15); // test function + ".*", 60, 15); // test function add_expected_result( "[^|]*", // compiler "[^|]*", // stdlib Index: test_igamma.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/Attic/test_igamma.cpp,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -d -r1.1.2.7 -r1.1.2.8 --- test_igamma.cpp 23 Dec 2006 17:28:30 -0000 1.1.2.7 +++ test_igamma.cpp 11 Apr 2007 11:44:43 -0000 1.1.2.8 @@ -118,6 +118,17 @@ "[^|]*", 500, 100); // test function // + // Mac OS X: + // + add_expected_result( + "[^|]*", // compiler + "[^|]*", // stdlib + "Mac OS", // platform + largest_type, // test type(s) + "[^|]*medium[^|]*", // test data group + "[^|]*", 100, 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) @@ -169,7 +180,7 @@ "[^|]*", // platform largest_type, // test type(s) "[^|]*large[^|]*", // test data group - "boost::math::gamma_p", 300, 50); // test function + "boost::math::gamma_p", 350, 50); // test function add_expected_result( "[^|]*", // compiler "[^|]*", // stdlib Index: test_tgamma_ratio.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/Attic/test_tgamma_ratio.cpp,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -d -r1.1.2.7 -r1.1.2.8 --- test_tgamma_ratio.cpp 4 Jan 2007 16:20:49 -0000 1.1.2.7 +++ test_tgamma_ratio.cpp 11 Apr 2007 11:44:43 -0000 1.1.2.8 @@ -56,14 +56,15 @@ #endif // // HP-UX - // This is a weird one, HP-UX shows up errors at float + // This is a weird one, HP-UX and Mac OS X show up errors at float // precision, that don't show up on other platforms. - // There appears to be some kind of rounding issue going on: + // There appears to be some kind of rounding issue going on (not enough + // precision in the input to get the answer right): // add_expected_result( "[^|]*", // compiler "[^|]*", // stdlib - "HP-UX|linux|.*(bsd|BSD).*", // platform + "HP-UX|Mac OS|linux|.*(bsd|BSD).*", // platform "float", // test type(s) "[^|]*", // test data group "boost::math::tgamma_ratio[^|]*", 35, 8); // test function |