Index: src/core/test/int64x64-test-suite.cc |
=================================================================== |
--- a/src/core/test/int64x64-test-suite.cc |
+++ b/src/core/test/int64x64-test-suite.cc |
@@ -997,13 +997,22 @@ |
const int64x64_t result = int64x64_t (value); |
// Make tolerance depend on magnitude of value |
+#ifndef _MSC_VER |
Peter Barnes
2018/05/23 19:45:42
Refactor with following comment.
ammo6818-vandals.uidaho.edu
2018/06/01 05:16:24
Its unclear what change you are requesting.
|
long double epsilon = std::numeric_limits<long double>::epsilon (); |
+#else |
+ long double epsilon = std::numeric_limits<double>::epsilon(); |
+#endif |
long double margin = 0; |
if (int64x64_t::implementation == int64x64_t::ld_impl) |
{ |
// Darwin 12.5.0 (Mac 10.8.5) g++ 4.2.1 |
margin = 1.0; |
} |
+#ifdef _MSC_VER |
+ // Visual Studio compiler uses 64-bit doubles for long doubles |
+ // Need non-zero margin to ensure final tolerance is non-zero |
+ margin = 1.0; |
+#endif |
if (RUNNING_ON_VALGRIND) |
{ |
// Valgrind uses 64-bit doubles for long doubles |