f_mR(Ab);
 f_mR(b);
 f_mR(A);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun(R5);
} while(stop_w());
 return 0;
/* ------------------------------------ */
On peut voir la méthode utiliser pour mettre les lignes dans la bon ordre.
 Exemple de sortie écran :
 Ab : Before the function sort_r_mR(); 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[1][1] = 0.000000 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[2][1] = 0.000000 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[3][1] = 0.000000 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[4][1] = 1.000000 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[2][2] = 1.000000 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[3][3] = 0.000000 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[4][3] = 1.000000 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[4][4] = 0.000000 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[5][4] = 1.000000 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 Ab
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 Press return to continue. 
/* --------- DEBUG 1 ---------- */
 Ab : pivot[5][5] = 1.000000 
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 Ab
 +1.0000 +0.0000 +0.0000 +0.0000 +0.0000 +4.3646 
 +0.0000 +1.0000 +0.0000 +0.0000 +0.0000 +1.6377 
 +0.0000 +0.0000 +1.0000 +0.0000 +0.0000 +8.1356 
 -0.0000 -0.0000 -0.0000 +1.0000 -0.0000 -6.0972 
 +0.0000 +0.0000 +0.0000 +0.0000 +1.0000 +3.9061 
 Press return to continue. 
 gj_TP_mR(Ab) :
 +1.00000 +0.00000 +0.00000 +0.00000 +0.00000 +4.36463 
 +0.00000 +1.00000 +0.00000 +0.00000 +0.00000 +1.63773 
 +0.00000 +0.00000 +1.00000 +0.00000 +0.00000 +8.13564 
 -0.00000 -0.00000 -0.00000 +1.00000 -0.00000 -6.09718 
 +0.00000 +0.00000 +0.00000 +0.00000 +1.00000 +3.90608 
 Press return to continue
 Press X to stop

Mathc matrices/e1506
Étude du code
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : gj06.c */
/* ------------------------------------ */
double **xx_gj1_T_mR(
double **Ab
int r= R1;
 while(r<Ab[R_SIZE][C0])
 if(fabs(pivotbest_gj1Ab_mR(Ab,r))>ERROR_E) 
 zero_under_pivot_gj1Ab_mR(Ab,r);
 r++;

while(r>R1)
 zero_below_pivot_gj1Ab_mR(Ab,--r);
return(Ab);
/* ------------------------------------ */
double **XX_gj_TP_mR(
double **Ab
 xx_gj1_T_mR(Ab); 
 sort_c_mR(Ab); 
 sort_r_mR(Ab);
return(Ab);
/* ------------------------------------ */
void fun(int r)
double **A = i_mR(r,r);
double **b = i_mR(r,C1);
double **Ab = i_Abr_Ac_bc_mR(r,r,C1);
/* i_Abr_Ac_bc_mR(R_Ab,C_A,C_b)); */
 do
 r_mR(A,999.);
 printf(".");
 }while(!det_R(A));
 r_mR(b,999.);
 c_A_b_Ab_mR(A,b,Ab);
 clrscrn();
 printf(" Copy/Past into the octave window.\n\n");
 p_Octave_mR(Ab,"Ab",P0);
 printf("\n rref(Ab.00000000001)\n\n");
 stop();
 clrscrn();
 XX_gj_TP_mR(Ab);
 printf(" gj_TP_mR(Ab) :\n");
 p_mR(Ab,S10,P4,C7);