Application

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

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int rc)
{
int n = 3;

double **A  = r_hermitian_mZ(i_mZ(rc,rc),9);
double **An =         pow_mZ(n,A,i_mZ(rc,rc));

  clrscrn();
  
  printf(" A : ");
  p_mZ(A, S8,P0, S6,P0, C5); 

  printf(" A**%d : ",n);
  p_mZ(An, S13,P0, S10,P0, C3); 
  
  f_mZ(A);
  f_mZ(An);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
  
   do 
         fun(rp_I(RC3)+RC1);
        
    while(stop_w());
        
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Pour tout n, A**n est hermitienne si A est hermitienne.


Exemple de sortie écran :

 A : 
    +378    +0i     -104   +11i      +91   -22i      +53   -24i 
    -104   -11i     +190    +0i      -19  +109i     -162   +40i 
     +91   +22i      -19  -109i     +146    +0i      +39   +95i 
     +53   +24i     -162   -40i      +39   -95i     +169    +0i 

 A**3 : 
    +78291525        +0i     -43884518  -3377339i     +24610186 -21081423i 
    -43884518  +3377339i     +43339536        +0i     -12107095 +27099529i 
    +24610186 +21081423i     -12107095 -27099529i     +24411172        +0i 
    +33906827  +5108517i     -36551348  -8844835i     +14762533 -21288142i 

    +33906827  -5108517i 
    -36551348  +8844835i 
    +14762533 +21288142i 
    +33095571        +0i 


 Press   return to continue
 Press X return to stop