diff --git a/test/complex_test.cpp b/test/complex_test.cpp index d45dcfccc..e12fc0182 100644 --- a/test/complex_test.cpp +++ b/test/complex_test.cpp @@ -204,6 +204,7 @@ void check_spots(const T&) { typedef std::complex ct; ct result; + static const T two = 2.0; T eps = std::pow(two, 1-std::numeric_limits::digits); // numeric_limits<>::epsilon way too small to be useful on Darwin. static const T zero = 0; static const T mzero = -zero; diff --git a/test/log1p_expm1_test.cpp b/test/log1p_expm1_test.cpp index 08df23f56..36977fbd4 100644 --- a/test/log1p_expm1_test.cpp +++ b/test/log1p_expm1_test.cpp @@ -538,7 +538,7 @@ void test(T) { //static const T factor = std::numeric_limits::epsilon() * 100; static const T two = 2; - static const T factor = std::pow(two, 1-std::numeric_limits::digits) * 100; + static const T factor = std::pow(two, 1-std::numeric_limits::digits) * 110; for(unsigned i = 0; i < sizeof(data)/sizeof(data[0]); ++i) { T input_value = static_cast(data[i][0]); @@ -569,9 +569,10 @@ int test_main(int, char* []) test(double(0)); // // The long double version of these tests fails on some platforms - // due to poor std lib support: + // due to poor std lib support (not enough digits returned from + // std::log and std::exp): // -#if !defined(__CYGWIN__) +#if !defined(__CYGWIN__) && !defined(__FreeBSD__) std::cout << "Running long double tests" << std::endl; test((long double)(0)); #endif