1
0

rcmp.cpp 459 B

12345678910111213141516171819
  1. #include "testlib.h"
  2. #include <stdio.h>
  3. #include <math.h>
  4. #define EPS 1.5E-5
  5. int main(int argc, char * argv[])
  6. {
  7. setName("compare two doubles, maximal absolute error = %.10lf", EPS);
  8. registerTestlibCmd(argc, argv);
  9. double ja = ans.readDouble();
  10. double pa = ouf.readDouble();
  11. if (fabs(ja - pa) > EPS)
  12. quitf(_wa, "expected %.10lf, found %.10lf", ja, pa);
  13. quitf(_ok, "answer is %.10lf", ja);
  14. }