test_quadruplet.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include "bgn.hpp"
  2. int main()
  3. {
  4. //NBTESTS =
  5. //100000 (main @17) 10^5 tests
  6. //temps_en_secondes =
  7. //126.74 (main @31) 2 minutes
  8. /** début chrono **/
  9. clock_t temps_initial, temps_final;
  10. double temps_en_secondes;
  11. temps_initial = clock (); /* initial time in microseconds */
  12. fpe_t i_1,j_1,k_1,l_1;
  13. //fpe_t temp;
  14. //fpe_setone(temp);
  15. //fpe_print(stdout,temp); // 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000
  16. zout(NBTESTS);
  17. for (int num_test=0; num_test<NBTESTS;num_test++)
  18. {
  19. //zout(num_test);
  20. fpe_setrandom(j_1);
  21. fpe_setrandom(k_1);
  22. fpe_setrandom(l_1);
  23. fpe_ad_minus_bc(i_1,j_1,k_1,l_1); // i1*l1 - j1*k1=1 on calcule i1 = (j1*k1 + 1)*l1^(-1)
  24. }
  25. /** fin chrono **/
  26. temps_final = clock (); /* final time in microseconds */
  27. temps_en_secondes = (temps_final - temps_initial) * 1e-6; /* total time in seconds */
  28. //cout << BLUE << "running time = " << temps_en_secondes << " sec" << RESET << endl;
  29. zout(temps_en_secondes) ;
  30. return EXIT_SUCCESS;
  31. }