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.

18 lines
328 B

25 years ago
  1. #include "test_I.h"
  2. int test_I_ord2 (int iterations)
  3. {
  4. int error = 0;
  5. int i;
  6. // Check against ash and oddp.
  7. for (i = iterations; i > 0; i--) {
  8. cl_I a = testrandom_I();
  9. if (a != 0) {
  10. uintL n = ord2(a);
  11. cl_I b = ash(a,-(sintL)n);
  12. ASSERT1(oddp(b), a);
  13. ASSERT1(a == ash(b,(sintL)n), a);
  14. }
  15. }
  16. return error;
  17. }