| Prev | Next |  |  |  |  |  | main_compare_c |

Main Program For Comparing C and C++ Speed
Source Code

    int main(void)
    {     bool flag;
         size_t i;

         random_seed(123);

         printf("correct_det_by_minor: ");
         flag = correct_det_by_minor();
         if( flag )
              printf("OK\n");
         else     printf("Error\n");

         for(i = 0; i < 5; i++)
         {     double time_min = 1.0;
              size_t size     = 2 + i * 2;
              int   i_size    = (int) size;
              printf("time_det_minor for %d x %d matrix = ", i_size, i_size);
              printf("%g\n", time_det_by_minor(size, time_min) );
         }

         if( flag )
              return 0;
         return 1;
    }

Input File: test_more/compare_c/det_by_minor.c