Mathc complexes/Fichiers c : pzero


Application


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


pzero.c
/* ------------------------------------ */
/*  Save as :   pzero.c                   */
/* ------------------------------------ */

/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A          = r_mZ(i_mZ(r,r),9.);

  clrscrn();
  printf(" A :");
  p_mZ(A, S2,P0, S2,P0, C10); 
     
  pivotbest_mZ(A,R1,C1);
  printf(" A :");
  p_mZ(A, S2,P0, S2,P0, C10);      
         
  zero_under_pivot_mZ(A,R1,C1);
  printf(" A :");
  p_mZ(A, S6,P2, S6,P2, C10);    
  
  f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
  fun(rp_I(2)+R3);
} while(stop_w());

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


L'application de l'algorithme.


Exemple de sortie écran :
 A :
-5-9i -5+2i -5-9i -7-3i 
-5+8i +4-5i -9-9i +2-7i 
+4-5i -1+8i +4+4i -5+8i 
+4-5i -1+8i +8-9i -7-3i 

 A :
-9-9i +4-5i -5+8i +2-7i 
-5-9i -5+2i -5-9i -7-3i 
+4+4i -1+8i +4-5i -5+8i 
+8-9i -1+8i +4-5i -7-3i 

 A :
 +1.00 +0.00i  +0.06 +0.50i  -0.17 -0.72i  +0.28 +0.50i 
 +0.00 +0.00i  -9.22 +5.00i  +0.67-14.11i -10.11 +2.00i 
 +0.00 +0.00i  +0.78 +5.78i  +1.78 -1.44i  -4.11 +4.89i 
 +0.00 +0.00i  -5.94 +4.50i +11.83 -0.72i -13.72 -4.50i 


 Press return to continue
 Press X      to stop