Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12)

Unified Diff: src/core/test/int64x64-test-suite.cc

Issue 342120043: New patch for core module changes (Closed)
Patch Set: Updated core patch Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b