Prev Next main_compare_c

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@This is cppad-20221105 documentation. Here is a link to its current documentation .
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