Application


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


c00a.c
/* ------------------------------------ */
/*  Save as :  c00a.c                   */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define   RCA        RC3
#define FACTOR_E    +1.E-3
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double **A             = rEcsymmetric_mZ(i_mZ(RCA,RCA),455.,1E-3);
double **sin_A         =               i_mZ(RCA,RCA);

double **EigsVector    =               i_mZ(RCA,RCA);
double **T_EigsVector  =               i_mZ(RCA,RCA);

double **EigsValue     =               i_mZ(RCA,RCA);
double **sin_EigsValue =               i_mZ(RCA,RCA);

double **T1            =               i_mZ(RCA,RCA);
  
  clrscrn();
  printf(" A :");
  p_mZ(A,S10,P4,S10,P4,C6); 

  eigs_V_mZ(A,EigsVector,FACTOR_E);
  ctranspose_mZ(EigsVector,T_EigsVector);
      
/* EigsValue : T_EigsVector * A * EigsVector */
  mul_mZ(T_EigsVector,A,T1);
  mul_mZ(T1,EigsVector,EigsValue);     
  
  f_eigs_mZ(sin,EigsValue,sin_EigsValue);

//A == EigsVector * EigsValue * T_EigsVector  
  mul_mZ(EigsVector,sin_EigsValue,T1);
  mul_mZ(T1,T_EigsVector,sin_A); 

  printf(" sin(A) :");
  p_mZ(sin_A,S10,P4,S10,P4,C6); 

/* ================================================================== */ 

  eigs_V_mZ(sin_A,EigsVector,FACTOR_E); 
  ctranspose_mZ(EigsVector,T_EigsVector);  
  
/* EigsValue : T_EigsVector * A * EigsVector */
  mul_mZ(T_EigsVector,sin_A,T1);
  mul_mZ(T1,EigsVector,EigsValue);     
  
  f_eigs_mZ(asin,EigsValue,sin_EigsValue);

//A == EigsVector * EigsValue * T_EigsVector  
  mul_mZ(EigsVector,sin_EigsValue,T1);
  mul_mZ(T1,T_EigsVector,A); 

  printf(" asin(sin(A)) = A :");
  p_mZ(A,S10,P4,S10,P4,C6);

  f_mZ(A);
  f_mZ(sin_A);

  f_mZ(EigsVector);
  f_mZ(T_EigsVector);
  
  f_mZ(EigsValue);  
  f_mZ(sin_EigsValue);    
      
  f_mZ(T1);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
  fun();

} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
               asin(sin(A)) = A
Exemple de sortie écran :
 ------------------------------------
 A :
   +0.4822   +0.0000i    +0.3947   -0.0161i    +0.2563   +0.2044i 
   +0.3947   +0.0161i    +0.4247   +0.0000i    +0.2309   +0.0521i 
   +0.2563   -0.2044i    +0.2309   -0.0521i    +0.5002   +0.0000i 

 sin(A) :
   +0.3975   +0.0000i    +0.3213   -0.0211i    +0.1941   +0.1672i 
   +0.3213   +0.0211i    +0.3598   +0.0000i    +0.1745   +0.0256i 
   +0.1941   -0.1672i    +0.1745   -0.0256i    +0.4345   +0.0000i 

 asin(sin(A)) = A :
   +0.4822   +0.0000i    +0.3947   -0.0161i    +0.2563   +0.2044i 
   +0.3947   +0.0161i    +0.4247   +0.0000i    +0.2309   +0.0521i 
   +0.2563   -0.2044i    +0.2309   -0.0521i    +0.5002   -0.0000i 


 Press   return to continue
 Press X return to stop