Make the absolute/relative tolerance information easier to read/understand.
authorReid Spencer <rspencer@reidspencer.com>
Sat, 25 Nov 2006 08:38:44 +0000 (08:38 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 25 Nov 2006 08:38:44 +0000 (08:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31908 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/FileUtilities.cpp

index ea7822a2c4b466aa4ed802c8fd4b84b3625f4e58..adee22d3191caa48f1798595d9d42d1a447a9421 100644 (file)
@@ -106,8 +106,9 @@ static bool CompareNumbers(char *&F1P, char *&F2P, char *F1End, char *F2End,
       Diff = 0;  // Both zero.
     if (Diff > RelTolerance) {
       if (ErrorMsg) {
-        *ErrorMsg = "Compared: " + ftostr(V1) + " and " + ftostr(V2) +
-                    ": diff = " + ftostr(Diff) + "\n";
+        *ErrorMsg = "Compared: " + ftostr(V1) + " and " + ftostr(V2) + "\n";
+        *ErrorMsg += "abs. diff = " + ftostr(std::abs(V1-V2)) + 
+                     " rel.diff = " + ftostr(Diff) + "\n";
         *ErrorMsg += "Out of tolerance: rel/abs: " + ftostr(RelTolerance) +
                      "/" + ftostr(AbsTolerance);
       }