Application


Installer et compiler ces fichiers dans votre répertoire de travail.


c00b.c
/* ------------------------------------ */
/*  Save as :   c00b.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */

void AplsB(int r)
{
double **A  = i_mZ(r,r);
double **B  = i_mZ(r,r);
double **C  = i_mZ(r,r);
double **T  = i_mZ(r,r);

  rE_commute3_mZ(A,B,C,999,1E-2);

  clrscrn();
  printf(" A : ");
  pE_mZ(A,S5,P3,S5,P3,C6);                                
  printf(" B : ");
  pE_mZ(B,S5,P3,S5,P3,C6);
  printf(" C : ");
  pE_mZ(C,S5,P3,S5,P3,C6);       
  stop();

  clrscrn();
  printf(" AB : ");
  pE_mZ(mul_mZ(A,B,T),S5,P3,S5,P3,C6);
  printf(" BA : ");
  pE_mZ(mul_mZ(B,A,T),S5,P3,S5,P3,C6);
  stop();

  clrscrn();
  printf(" AC : ");
  pE_mZ(mul_mZ(A,C,T),S5,P3,S5,P3,C6);
  printf(" CA : ");
  pE_mZ(mul_mZ(C,A,T),S5,P3,S5,P3,C6);
  stop();

  clrscrn();
  printf(" BC : ");
  pE_mZ(mul_mZ(B,C,T),S5,P3,S5,P3,C6);
  printf(" CB : ");
  pE_mZ(mul_mZ(C,B,T),S5,P3,S5,P3,C6);   
  
  f_mZ(A);
  f_mZ(B);
  f_mZ(C);
  f_mZ(T);
}
/* ------------------------------------ */
void hello(void)
{
  
  printf("\n                                                  ");
  printf("\n     Three Commutative matrices                    ");
  printf("\n            ****************                    \n");
  printf("\n                                                  ");
  printf("\n                                                  ");
  printf("\n                                                \n");
  stop();
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
  hello();

do
{
  AplsB(RC3);

} while(stop_w());

  return 0;
}
/* ------------------------------------ */


Exemple de sortie écran :
 A : 
+2.063e+00+5.615e-01i +1.031e+00+1.190e+00i -8.775e-01+7.577e-01i 
-2.481e+00-2.042e+00i -9.246e-01-2.281e+00i +2.158e+00-6.076e-01i 
+2.516e+00-5.656e-01i +1.761e+00+4.627e-01i -3.144e-01+1.720e+00i 

 B : 
-6.644e-01+4.222e+00i -2.222e+00+2.661e+00i -2.274e+00-3.123e+00i 
-4.585e+00-4.913e+00i -1.447e+00-5.440e+00i +5.925e+00+1.112e-01i 
-4.614e-01-2.548e+00i +9.072e-01-2.303e+00i +2.078e+00+1.217e+00i 

 C : 
+1.000e+00-1.020e-01i +6.360e-01+3.030e-01i -1.975e-01+5.904e-01i 
-7.107e-01-4.907e-01i -2.470e-01-5.526e-01i +4.582e-01-2.759e-01i 
+1.143e+00-3.798e-02i +6.982e-01+3.932e-01i -2.700e-01+6.546e-01i 

 Press return to continue. 


 AB : 
-2.856e-01-3.009e-01i -1.454e-01-3.811e-01i +2.937e-01-4.598e-02i 
+7.551e-01+6.678e-01i +4.302e-01+7.443e-01i -7.358e-01+1.346e-01i 
-5.571e-01+2.335e-01i -4.401e-01-1.193e-02i +1.467e-01-4.434e-01i 

 BA : 
-2.856e-01-3.009e-01i -1.454e-01-3.811e-01i +2.937e-01-4.598e-02i 
+7.551e-01+6.678e-01i +4.302e-01+7.443e-01i -7.358e-01+1.346e-01i 
-5.571e-01+2.335e-01i -4.401e-01-1.193e-02i +1.467e-01-4.434e-01i 

 Press return to continue. 


 AC : 
+9.978e-01-1.017e-01i +6.346e-01+3.023e-01i -1.971e-01+5.891e-01i 
-7.091e-01-4.897e-01i -2.464e-01-5.514e-01i +4.572e-01-2.753e-01i 
+1.140e+00-3.789e-02i +6.966e-01+3.924e-01i -2.694e-01+6.531e-01i 

 CA : 
+9.978e-01-1.017e-01i +6.346e-01+3.023e-01i -1.971e-01+5.891e-01i 
-7.091e-01-4.897e-01i -2.464e-01-5.514e-01i +4.572e-01-2.753e-01i 
+1.140e+00-3.789e-02i +6.966e-01+3.924e-01i -2.694e-01+6.531e-01i 

 Press return to continue. 


 BC : 
-6.634e-02+6.764e-03i -4.219e-02-2.010e-02i +1.310e-02-3.917e-02i 
+4.714e-02+3.255e-02i +1.638e-02+3.666e-02i -3.040e-02+1.830e-02i 
-7.580e-02+2.519e-03i -4.631e-02-2.608e-02i +1.791e-02-4.342e-02i 

 CB : 
-6.634e-02+6.764e-03i -4.219e-02-2.010e-02i +1.310e-02-3.917e-02i 
+4.714e-02+3.255e-02i +1.638e-02+3.666e-02i -3.040e-02+1.830e-02i 
-7.580e-02+2.519e-03i -4.631e-02-2.608e-02i +1.791e-02-4.342e-02i 


 Press   return to continue
 Press X return to stop