Mathc matrices/Fichiers c : m0


Application


Installer et compiler ce fichier dans votre répertoire de travail.

c00c.c
/* ------------------------------------ */
/*  Save as :   c00c.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
  double **A = i_mR(R3,C8);
  
  
/* ------------------------------------ */  
  clrscrn();  
  r_mR(A,99.); 
  printf("  x = +22    .   333  \n"
         " Sn =  S3 + P1 + P3 = S%d\n\n", S3+P1+P3);
  pall_mR(A,    S3 + P1 + P3,
                           P3,C3);   
  stop();
/* ------------------------------------ */  
/* ------------------------------------ */   
  clrscrn();  
  r_mR(A,9999.); 
  printf("  x = +4444    .   333  \n"
         " Sn =    S5 + P1 + P3 = S%d\n\n", S5+P1+P3);
  pall_mR(A,      S5 + P1 + P3,
                             P3,C3);   
  stop();  
/* ------------------------------------ */  
/* ------------------------------------ */    
  clrscrn();  
  r_mR(A,9999.); 
  printf("  x = +4444    .    0  \n"
         " Sn =    S5 + P0 + P0 = S%d\n\n", S5+P0+P0);
  pall_mR(A,      S5 + P0 + P0,
                             P0,C3);   
  stop();   
/* ------------------------------------ */  
/* ------------------------------------ */    
  clrscrn();  
  rE_mR(A,9999.,1E-4); 
  printf("  x =    +0    . 4444 \n"
         " Sn =    S2 + P1 + P4 = S%d\n\n", S2+P1+P4);
  pall_mR(A,      S2 + P1 + P4,
                             P4,C3);   
  stop();  
/* ------------------------------------ */ 
/* ------------------------------------ */    
  clrscrn();  
  rE_mR(A,999999.,1E-4); 
  printf("  x =   +22    . 4444 \n"
         " Sn =    S3 + P1 + P4 = S%d\n\n", S3+P1+P4);
  pall_mR(A,      S3 + P1 + P4,
                             P4,C3);   
  stop();  
/* ------------------------------------ */ 
/* ------------------------------------ */      
  
  f_mR(A);
  
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Sn =  S3 + P1 + P3 = S7
Sn : Présente la méthode que j'ai utilisé pour calculer l'espace que j'ai laissé entre les nombres.

Exemple de sortie écran :

  x = +22    .   333  
 Sn =  S3 + P1 + P3 = S7

+4              +1      +2 

+9         +29.000 -73.000 
+0         +43.000 +80.000 
+0         +55.000 -96.000 

     +3      +4      +5 

-24.000 +56.000 -70.000 
+99.000 -61.000 +27.000 
+74.000 +14.000 -52.000 

     +6      +7      +8 

-42.000  -6.000 +96.000 
-45.000 -92.000 +33.000 
-82.000 -78.000 +60.000 

 Press return to continue. 
/* ------------------------------------ */
/* ------------------------------------ */
  x = +4444    .   333  
 Sn =    S5 + P1 + P3 = S9

+4                  +1        +2 

+9           +3297.000 +9381.000 
+0           -7608.000 -1430.000 
+0           +8819.000 +1798.000 

       +3        +4        +5 

+7373.000 -1152.000  +645.000 
-1391.000  -298.000 -3574.000 
+3876.000 -4579.000 -8001.000 

       +6        +7        +8 

-5297.000 -3481.000  -852.000 
-8724.000 +6492.000 +1492.000 
+5353.000  +846.000 +2144.000 

 Press return to continue. 
/* ------------------------------------ */
/* ------------------------------------ */
  x = +4444    .    0  
 Sn =    S5 + P0 + P0 = S5

+4          +1    +2 

+9       +1799 -5044 
+0       +3311 -4563 
+0       -1738 +7744 

   +3    +4    +5 

+4420 +5520 -9180 
-3373 -4871  -599 
-5028 -7315 -2255 

   +6    +7    +8 

+7782 +6388 +5462 
-4438 -9592 -1480 
+1464 -7535 -7014 

 Press return to continue. 
/* ------------------------------------ */
/* ------------------------------------ */
  x =    +0    . 4444 
 Sn =    S2 + P1 + P4 = S7

+4              +1      +2 

+9         -0.7348 +0.9613 
+0         +0.5511 +0.8919 
+0         -0.7263 +0.5950 

     +3      +4      +5 

-0.0719 -0.3677 -0.7873 
+0.4610 +0.6329 +0.1332 
-0.8555 +0.0882 -0.0906 

     +6      +7      +8 

-0.4344 -0.7860 -0.2021 
+0.7090 +0.7881 -0.1294 
-0.5476 -0.4212 -0.9945 

 Press return to continue. 
/* ------------------------------------ */
/* ------------------------------------ */
  x =   +22    . 4444 
 Sn =    S3 + P1 + P4 = S8

+4                +1       +2 

+9          -90.9841  +6.5895 
+0           +0.4814 +23.6524 
+0          +38.6246 -61.9050 

      +3       +4       +5 

-36.7933 -33.7804 +32.0880 
-79.8721 +57.1422  -4.4031 
+50.3967 +90.9697 +30.9265 

      +6       +7       +8 

-96.6383 +11.6046 +11.8959 
-25.9630 -29.8971 -69.0869 
-11.1131 +76.0096 -37.8138 

 Press return to continue.