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.

33 lines
641 B

25 years ago
  1. #include <cln/number.h>
  2. #include <cln/io.h>
  3. #include <cln/float.h>
  4. #include <cln/real.h>
  5. #include <cln/random.h>
  6. #include <cstdlib>
  7. #include <cstring>
  8. #include <cln/timing.h>
  9. namespace cln
  10. {
  11. // FIXME: don't use internal functions!
  12. extern cl_LF compute_exp1 (uintC len);
  13. }
  14. using namespace cln;
  15. int main (int argc, char * argv[])
  16. {
  17. int repetitions = 1;
  18. if ((argc >= 3) && !strcmp(argv[1],"-r")) {
  19. repetitions = atoi(argv[2]);
  20. argc -= 2; argv += 2;
  21. }
  22. if (argc < 2)
  23. exit(1);
  24. uintL len = atoi(argv[1]);
  25. cl_LF p;
  26. { CL_TIMING;
  27. for (int rep = repetitions; rep > 0; rep--)
  28. { p = compute_exp1(len); }
  29. }
  30. // cout << p << endl;
  31. }