2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-15 13:12:19 +00:00

Some minor tweaks to support Sun's compiler on Linux.

[SVN r40678]
This commit is contained in:
John Maddock
2007-11-02 08:59:24 +00:00
parent 2426ea735d
commit d112d855f2
3 changed files with 3 additions and 3 deletions

View File

@@ -81,7 +81,7 @@ template <class RealType>
void test_spots(RealType)
{
// Basic sanity checks
RealType tolerance = static_cast<RealType>(std::pow(10., -(4-2))); // 1e-4 (as %)
RealType tolerance = 1e-2f; // 1e-4 (as %)
// Some tests only pass at 1e-4 because values generated by
// http://faculty.vassar.edu/lowry/VassarStats.html
// give only 5 or 6 *fixed* places, so small values have fewer digits.

View File

@@ -63,7 +63,7 @@ void test_spots(RealType)
}
decdigits -= 1; // Perhaps allow some decimal digit(s) margin of numerical error.
RealType tolerance = static_cast<RealType>(std::pow(10., -(decdigits-2))); // 1e-6 (-2 so as %)
RealType tolerance = static_cast<RealType>(std::pow(10., static_cast<double>(2-decdigits))); // 1e-6 (-2 so as %)
tolerance *= 2; // Allow some bit(s) small margin (2 means + or - 1 bit) of numerical error.
// Typically 2e-13% = 2e-15 as fraction for double.

View File

@@ -54,7 +54,7 @@ template <class RealType>
void test_spots(RealType)
{
// Basic sanity checks
RealType tolerance = static_cast<RealType>(std::pow(10., -(6-2))); // 1e-6 (as %)
RealType tolerance = 1e-4; // 1e-6 (as %)
// Some tests only pass at 1e-5 because probability value is less accurate,
// a digit in 6th decimal place, although calculated using
// a t-distribution generator (claimed 6 decimal digits) at