Exemple de sortie écran :
 We want to find X such as, 
 AX = B 
 If A is a square matrix and, 
 If A has an inverse matrix, 
 you can find X by this method
 X = inv(A) B 
 To verify the result you can 
 multiply the matrix A by X. 
 You must refind B. 
 Press return to continue. 
 ------------------------------------ 
 A :
+892+364i -815+830i +10+864i 
+378-611i -43+562i -747-975i 
+622+798i -397-977i +566-111i 
 B :
 +48+674i 
+172+672i 
-855 +78i 
 Press return to continue. 
 ------------------------------------ 
 invgj_mZ(A,Inv) :
+3.529e-04-4.554e-04i +6.301e-04-5.369e-04i +1.045e-03+5.105e-05i 
+6.497e-05-4.498e-04i +6.559e-04-2.787e-04i +5.069e-04+7.702e-04i 
-1.625e-04-2.323e-04i -6.101e-04+5.187e-04i -2.516e-04-1.636e-04i 
 X = invgj_mZ(A,Inv) * B :
-0.104+0.585i 
+0.113-0.204i 
-0.077-0.321i 
 Press return to continue. 
 B :
 +48+674i 
+172+672i 
-855 +78i 
 AX :
 +48+674i 
+172+672i 
-855 +78i 
 Press return to continue
 Press X to stop

Mathc complexes/c092b
Application 
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c02b.c */
void fun(int r)
double **A = i_mZ(r,r);
double **Inv = i_mZ(r,r);
double **B = r_mZ(i_mZ(r,C3),9999.);
double **X = i_mZ(r,C3);
double **T = i_mZ(r,C3);
 do
 r_mZ(A,9999.);
 printf(".");
 }while(!det_Z(A).r);
 clrscrn();
 printf(" \n");
 printf(" Linear systems with common coefficient matrix.\n\n");
 printf(" Ax1=b1 \n");
 printf(" Ax2=b2 \n");
 printf(" ... \n");
 printf(" Axn=bn \n\n");
 printf(" We can write these equalities in this maner. \n\n");
 printf(" A|x1|x2|...|xn| = b1|b2|...|bn| \n\n");
 printf(" or simply : \n\n");
 printf(" AX = B \n\n");
 printf(" where B = b1|b2|...|bn \n\n");
 printf(" and X = x1|x2|...|xn \n\n");
 stop();
 clrscrn();
 printf(" We want to find X such as, \n\n");
 printf(" AX = B \n\n");
 printf(" If A is a square matrix and, \n\n");
 printf(" If A has an inverse matrix, \n\n");
 printf(" you can find X by this method\n\n");
 printf(" X = inv(A) B \n\n\n");
 printf(" To verify the result you can \n\n");
 printf(" multiply the matrix A by X. \n\n");
 printf(" You must refind B. \n\n");
 stop();
 clrscrn();
 printf(" A :");
 p_mZ(A, S6,P0, S6,P0, C6);
 printf(" b1 b2 ... bn :");
 p_mZ(B, S6,P0, S6,P0, C6);
 stop();
 clrscrn();
 printf(" invgj_mZ(A,Inv) :");
 pE_mZ(invgj_mZ(A,Inv), S6,P4, S6,P4, C3);
 stop();
 clrscrn();
 printf(" X = invgj_mZ(A,Inv) * B :\n");
 printf(" x1 x2 ... xn :");
 p_mZ(mul_mZ(Inv,B,X), S6,P4, S6,P4, C6);
 stop();
 clrscrn();
 printf(" b1 b2 ... bn :");
 p_mZ(B, S6,P0, S6,P0, C6);
 printf(" Ax1 Ax2 ... Axn :");
 p_mZ(mul_mZ(A,X,T), S6,P0, S6,P0, C6);
 f_mZ(T);
 f_mZ(X);
 f_mZ(B);
 f_mZ(Inv);
 f_mZ(A);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun(rp_I(R4)+R1);
} while(stop_w());
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 Linear systems with common coefficient matrix.
 Ax1=b1 
 Ax2=b2 
 Axn=bn 
 We can write these equalities in this maner. 
 A|x1|x2|...|xn| = b1|b2|...|bn| 
 or simply : 
 AX = B 
 where B = b1|b2|...|bn 
 and X = x1|x2|...|xn 
 Press return to continue. 
 ------------------------------------ 
 We want to find X such as, 
 AX = B 
 If A is a square matrix and, 
 If A has an inverse matrix, 
 you can find X by this method
 X = inv(A) B 
 To verify the result you can 
 multiply the matrix A by X. 
 You must refind B. 
 Press return to continue. 
 ------------------------------------ 
 A :
+7062 -457i +404 +452i +166+5366i 
-9677-9655i +2816-9683i -2553-2409i 
 +272+3942i +2796+4868i +3814-5081i 
 b1 b2 ... bn :
-1389+8804i -4597+8290i +2286-8829i 
+8046+2278i -3747+1106i -6083-3275i 
 +850-6925i -4611-4871i -4477 +112i 
 Press return to continue. 
 ------------------------------------ 
 invgj_mZ(A,Inv) :
+1.737e-05-1.592e-04i -8.611e-05-5.143e-05i -3.902e-05-1.583e-04i 
+2.026e-04+2.088e-04i +1.713e-04+5.745e-05i +2.018e-04+1.213e-04i 
+1.836e-04-1.737e-04i +4.494e-05-1.083e-04i +1.806e-04-5.427e-05i 
 Press return to continue. 
 ------------------------------------ 
 X = invgj_mZ(A,Inv) * B :
 x1 x2 ... xn :
-0.328-0.100i +1.028+1.893i -0.818+0.782i 
+0.139+1.052i -3.707-0.848i +0.536-2.743i 
+1.660-0.208i -0.549+2.147i -2.544-1.243i 
 Press return to continue. 
 ------------------------------------ 
 b1 b2 ... bn :
-1389+8804i -4597+8290i +2286-8829i 
+8046+2278i -3747+1106i -6083-3275i 
 +850-6925i -4611-4871i -4477 +112i 
 Ax1 Ax2 ... Axn :
-1389+8804i -4597+8290i +2286-8829i 
+8046+2278i -3747+1106i -6083-3275i 
 +850-6925i -4611-4871i -4477 +112i 
 Press return to continue
 Press X to stop

Mathc complexes/a10
Bibliothéque
Copier la bibliothèque dans votre répertoire de travail avec les fichiers des parties précédentes :
Exemple pour tester la bibliothèque :

Mathc complexes/h10a
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : wg.h */
/* ------------------------------------ */
 Déclaration des fichiers h.

Mathc complexes/h10c
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : wgconsit.h */
double add_coef_r_Ab_mZ(
double **Ab,
int r
double x=0.;
int c;
 for ( c=C1; c<Ab[C_SIZE][C0]; c++)
 x+=fabs(Ab[r][c]);
 return(x);
/* ------------------------------------ */
double add_coef_r_A_mZ(
double **A,
int r
double x=0.;
int c;
 for ( c=C1; c<A[C_SIZE_A][C0]; c++)
 x+=fabs(A[r][c]);
 return(x);
/* ------------------------------------ */
int is_system_consistent_mZ(
double **Ab,
double **c_Ab
double **Ab_T=i_RC_mZ(Ab[R_SIZE][C0],Ab[C_SIZE][C0]);
int consistent = 1;
int r_T=R1;
int r;
 for ( r=R1; r<Ab[R_SIZE][C0]; r++)
 if(add_coef_r_A_mZ(c_Ab,r)>ERROR_E)
 c_r_mZ(Ab,r,Ab_T,r_T);
 r_T++;
 else if((add_coef_r_A_mZ(c_Ab,r)<ERROR_E) &&
 (add_coef_r_Ab_mZ(c_Ab,r)>ERROR_E))
 if(consistent)
 printf(" This(ese) row(s) are incompatible.\n");
 printf(" row %d; ",r);
 consistent=0;
 c_mZ(Ab_T,Ab);
 f_mZ(Ab_T);
 if(!consistent)
 printf("\n\n This(ese) equation(s) was already defined\n");
 printf(" with an other value(s) \n");
 printf("\n The system is inconsistent. \n");
 printf(" I prefer to close the program.\n");
 printf(" Press return to continue. \n");
 fflush(stdout);
 getchar();
 exit(EXIT_FAILURE);
 return(r_T);
/* ------------------------------------ */
 Déclaration des fichiers h.

Mathc complexes/h10e
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : wgpivot2.h */
/* ------------------------------------
 pivotbest = |a+bI|^2 = = a^2+b^2
double pivotbest2Ab_mZ(
double **Ab,
int pivot_r,
int pivot_c
double c_max = ((Ab[R_SIZE][C0]-C1)*C2)+C1;
double pivotbest=Ab[pivot_r][pivot_c] *Ab[pivot_r][pivot_c]
 Ab[pivot_r][pivot_c+C1]*Ab[pivot_r][pivot_c+C1];
double pivot = pivotbest;
int best_r = pivot_r;
int best_c = pivot_c;
int r;
int c;
 for( r=pivot_r; r<Ab[R_SIZE][C0]; r++)
 for( c=pivot_c; c<c_max; c+=C2)
 pivot = Ab[r][c]*Ab[r][c] + Ab[r][c+C1]*Ab[r][c+C1];
 if(pivot>pivotbest)
 pivotbest=pivot;
 best_r = r;
 best_c = c;
 if(best_r!=pivot_r) swapR_mZ(Ab,pivot_r,best_r);
 if(best_c!=pivot_c) swapC_mZ(Ab,pivot_c,best_c);
 return(pivotbest);
/* ------------------------------------ */

Mathc complexes/h10f
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : wgpivot4.h */
/* ------------------------------------
 pivotbest = |a+bI|^2 = = a^2+b^2
double pivotbest4Ab_r0_mZ(
double **Ab,
int pivot_r,
int pivot_c
double pivotbest=Ab[pivot_r][pivot_c] *Ab[pivot_r][pivot_c]
 Ab[pivot_r][pivot_c+C1]*Ab[pivot_r][pivot_c+C1];
double pivot;
int best_r = pivot_r;
int r;
 for( r=pivot_r; r<Ab[R_SIZE][C0]; r++)
 pivot = Ab[r][pivot_c] * Ab[r][pivot_c]
 Ab[r][pivot_c+C1] * Ab[r][pivot_c+C1];
 if(pivot>pivotbest)
 pivotbest=pivot;
 best_r = r;
 if(best_r!=pivot_r) { swapR_mZ(Ab,pivot_r,best_r);
 swapcoef_R0_mZ(Ab,(((pivot_r-C1)*C2)+C1),
 (((best_r -C1)*C2)+C1) );
 return(pivotbest);
/* ------------------------------------ */
 Déclaration des fichiers h.