You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
764 B

25 years ago
25 years ago
  1. #include <iostream>
  2. #include "base/cl_macros.h"
  3. extern int test_MI_canonhom (int iterations);
  4. extern int test_MI_plus (int iterations);
  5. extern int test_MI_minus (int iterations);
  6. extern int test_MI_mul (int iterations);
  7. extern int test_MI_recip (int iterations);
  8. extern int test_MI_div (int iterations);
  9. extern int test_MI_expt (int iterations);
  10. #define RUN(tester,iterations) \
  11. std::cout << "Testing "#tester"..." << std::endl; \
  12. error |= tester (iterations);
  13. int test_MI (int iterations)
  14. {
  15. int error = 0;
  16. RUN(test_MI_canonhom,iterations);
  17. RUN(test_MI_plus,iterations);
  18. RUN(test_MI_minus,iterations);
  19. RUN(test_MI_mul,iterations);
  20. RUN(test_MI_recip,iterations);
  21. RUN(test_MI_div,iterations);
  22. RUN(test_MI_expt,ceiling(iterations,20));
  23. return error;
  24. }