2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-01 20:42:19 +00:00

Fixed digamma 128-bit error rates with a more accurate value for the root.

Updated png's: hopefully they'll all render OK now.
Tweeked docs to reflect recent advances.


[SVN r3237]
This commit is contained in:
John Maddock
2006-10-04 09:57:05 +00:00
parent b1fd830fde
commit 5b95219e09
12 changed files with 27 additions and 25 deletions

View File

@@ -42,14 +42,6 @@ void expected_results()
// Define the max and mean errors expected for
// various compilers and platforms.
//
add_expected_result(
".*aCC.*", // compiler
".*", // stdlib
".*", // platform
".*", // test type(s)
".*Root.*", // test data group
".*", 220, 40); // test function
add_expected_result(
".*", // compiler
".*", // stdlib
@@ -137,12 +129,11 @@ void test_spots(T, const char* t)
// Special tolerance (200eps) for when we're very near the root,
// and T has more than 64-bits in it's mantissa:
//
T tolerance2 = boost::math::tools::digits<T>() > 64 ? boost::math::tools::epsilon<T>() * 20000 : tolerance;
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(0.125)), static_cast<T>(-8.3884926632958548678027429230863430000514460424495L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(0.5)), static_cast<T>(-1.9635100260214234794409763329987555671931596046604L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(1)), static_cast<T>(-0.57721566490153286060651209008240243104215933593992L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(1.5)), static_cast<T>(0.036489973978576520559023667001244432806840395339566L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(1.5) - static_cast<T>(1)/32), static_cast<T>(0.00686541147073577672813890866512415766586241385896200579891429L), tolerance2);
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(1.5) - static_cast<T>(1)/32), static_cast<T>(0.00686541147073577672813890866512415766586241385896200579891429L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(2)), static_cast<T>(0.42278433509846713939348790991759756895784066406008L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(8)), static_cast<T>(2.0156414779556099965363450527747404261006978069172L), tolerance);
BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast<T>(12)), static_cast<T>(2.4426616799758120167383652547949424463027180089374L), tolerance);