Kaynağa Gözat

- C++11 support.

mirzayanovmr 9 yıl önce
ebeveyn
işleme
055e575902

+ 3 - 3
checkers/acmp.cpp

@@ -6,14 +6,14 @@ const double EPS = 1.5E-6;
 
 int main(int argc, char * argv[])
 {
-    setName("compare two doubles, maximal absolute error = %.10lf", EPS);
+    setName("compare two doubles, maximal absolute error = %.10f", EPS);
     registerTestlibCmd(argc, argv);
     
     double ja = ans.readDouble();
     double pa = ouf.readDouble();
 
     if (fabs(ja - pa) > EPS + 1E-15)
-        quitf(_wa, "expected %.10lf, found %.10lf", ja, pa);
+        quitf(_wa, "expected %.10f, found %.10f", ja, pa);
     
-    quitf(_ok, "answer is %.10lf", ja);
+    quitf(_ok, "answer is %.10f", ja);
 }

+ 3 - 3
checkers/dcmp.cpp

@@ -6,14 +6,14 @@ const double EPS = 1E-6;
 
 int main(int argc, char * argv[])
 {
-    setName("compare two doubles, maximal absolute or relative error = %.10lf", EPS);
+    setName("compare two doubles, maximal absolute or relative error = %.10f", EPS);
     registerTestlibCmd(argc, argv);
     
     double ja = ans.readDouble();
     double pa = ouf.readDouble();
     
     if (!doubleCompare(ja, pa, EPS))
-        quitf(_wa, "expected %.10lf, found %.10lf", ja, pa);
+        quitf(_wa, "expected %.10f, found %.10f", ja, pa);
     
-    quitf(_ok, "answer is %.10lf", ja);
+    quitf(_ok, "answer is %.10f", ja);
 }

+ 1 - 1
checkers/pointscmp.cpp

@@ -10,5 +10,5 @@ int main(int argc, char * argv[])
     double ja = ans.readDouble();
     double pa = ouf.readDouble();
 
-    quitp(fabs(ja - pa), "ja=%.4lf pa=%.4lf", ja, pa);
+    quitp(fabs(ja - pa), "ja=%.4f pa=%.4f", ja, pa);
 }

+ 3 - 3
checkers/rcmp.cpp

@@ -6,14 +6,14 @@ const double EPS = 1.5E-6;
 
 int main(int argc, char * argv[])
 {
-    setName("compare two doubles, maximal absolute error = %.10lf", EPS);
+    setName("compare two doubles, maximal absolute error = %.10f", EPS);
     registerTestlibCmd(argc, argv);
     
     double ja = ans.readDouble();
     double pa = ouf.readDouble();
 
     if (fabs(ja - pa) > EPS + 1E-15)
-        quitf(_wa, "expected %.10lf, found %.10lf", ja, pa);
+        quitf(_wa, "expected %.10f, found %.10f", ja, pa);
     
-    quitf(_ok, "answer is %.10lf", ja);
+    quitf(_ok, "answer is %.10f", ja);
 }

+ 3 - 3
checkers/rcmp4.cpp

@@ -7,7 +7,7 @@ const double EPS = 1E-4;
 
 int main(int argc, char * argv[])
 {
-    setName("compare two sequences of doubles, max absolute or relative error = %.5lf", EPS);
+    setName("compare two sequences of doubles, max absolute or relative error = %.5f", EPS);
     registerTestlibCmd(argc, argv);
 
     int n = 0;
@@ -20,13 +20,13 @@ int main(int argc, char * argv[])
         p = ouf.readDouble();
         if (!doubleCompare(j, p, EPS))
         {
-            quitf(_wa, "%d%s numbers differ - expected: '%.5lf', found: '%.5lf', error = '%.5lf'",
+            quitf(_wa, "%d%s numbers differ - expected: '%.5f', found: '%.5f', error = '%.5f'",
                 n, englishEnding(n).c_str(), j, p, doubleDelta(j, p));
         }
     }
 
     if (n == 1)
-        quitf(_ok, "found '%.5lf', expected '%.5lf', error '%.5lf'", p, j, doubleDelta(j, p));
+        quitf(_ok, "found '%.5f', expected '%.5f', error '%.5f'", p, j, doubleDelta(j, p));
     
     quitf(_ok, "%d numbers", n);
 }

+ 3 - 3
checkers/rcmp6.cpp

@@ -7,7 +7,7 @@ const double EPS = 1E-6;
 
 int main(int argc, char * argv[])
 {
-    setName("compare two sequences of doubles, max absolute or relative  error = %.7lf", EPS);
+    setName("compare two sequences of doubles, max absolute or relative  error = %.7f", EPS);
     registerTestlibCmd(argc, argv);
 
     int n = 0;
@@ -20,13 +20,13 @@ int main(int argc, char * argv[])
         p = ouf.readDouble();
         if (!doubleCompare(j, p, EPS))
         {
-            quitf(_wa, "%d%s numbers differ - expected: '%.7lf', found: '%.7lf', error = '%.7lf'",
+            quitf(_wa, "%d%s numbers differ - expected: '%.7f', found: '%.7f', error = '%.7f'",
                 n, englishEnding(n).c_str(), j, p, doubleDelta(j, p));
         }
     }
 
     if (n == 1)
-        quitf(_ok, "found '%.7lf', expected '%.7lf', error '%.7lf'", p, j, doubleDelta(j, p));
+        quitf(_ok, "found '%.7f', expected '%.7f', error '%.7f'", p, j, doubleDelta(j, p));
 
     quitf(_ok, "%d numbers", n);
 }

+ 3 - 3
checkers/rcmp9.cpp

@@ -7,7 +7,7 @@ const double EPS = 1E-9;
 
 int main(int argc, char * argv[])
 {
-    setName("compare two sequences of doubles, max absolute or relative error = %.10lf", EPS);
+    setName("compare two sequences of doubles, max absolute or relative error = %.10f", EPS);
     registerTestlibCmd(argc, argv);
 
     int n = 0;
@@ -20,13 +20,13 @@ int main(int argc, char * argv[])
         p = ouf.readDouble();
         if (!doubleCompare(j, p, EPS))
         {
-            quitf(_wa, "%d%s numbers differ - expected: '%.7lf', found: '%.7lf', error = '%.7lf'",
+            quitf(_wa, "%d%s numbers differ - expected: '%.10f', found: '%.10f', error = '%.10f'",
                 n, englishEnding(n).c_str(), j, p, doubleDelta(j, p));
         }
     }
 
     if (n == 1)
-        quitf(_ok, "found '%.9lf', expected '%.9lf', error '%.9lf'", p, j, doubleDelta(j, p));
+        quitf(_ok, "found '%.10f', expected '%.10f', error '%.10f'", p, j, doubleDelta(j, p));
 
     quitf(_ok, "%d numbers", n);
 }

+ 2 - 2
checkers/rncmp.cpp

@@ -7,7 +7,7 @@ const double EPS = 1.5E-5;
 
 int main(int argc, char * argv[])
 {
-    setName("compare two sequences of doubles, maximal absolute error = %.10lf", EPS);
+    setName("compare two sequences of doubles, maximal absolute error = %.10f", EPS);
     registerTestlibCmd(argc, argv);
 
     int n = 0;
@@ -17,7 +17,7 @@ int main(int argc, char * argv[])
         double j = ans.readDouble();
         double p = ouf.readDouble();
         if (fabs(j - p) > EPS + 1E-15)
-            quitf(_wa, "%d%s numbers differ - expected: '%.10lf', found: '%.10lf'", n, englishEnding(n).c_str(), j, p);
+            quitf(_wa, "%d%s numbers differ - expected: '%.10f', found: '%.10f'", n, englishEnding(n).c_str(), j, p);
     }
 
     quitf(_ok, "%d numbers", n);