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),555.,1E-3);
double **cosh_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 **cosh_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(cosh,EigsValue,cosh_EigsValue);

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

  printf(" cosh(A):");
  p_mZ(cosh_A,S10,P4,S10,P4,C6); 

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

  eigs_V_mZ(cosh_A,EigsVector,FACTOR_E);
  ctranspose_mZ(EigsVector,T_EigsVector); 
  
/* EigsValue : T_EigsVector * A * EigsVector */
  mul_mZ(T_EigsVector,cosh_A,T1);
  mul_mZ(T1,EigsVector,EigsValue);     
  
  f_eigs_mZ(acosh,EigsValue,cosh_EigsValue);

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

  printf(" acosh(cosh(A)) = A :");
  p_mZ(A,S10,P4,S10,P4,C6);

  f_mZ(A);
  f_mZ(cosh_A);

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

  srand(time(&t));

do
{
  fun();

} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
               acosh(cosh(A)) = A
Exemple de sortie écran :
 ------------------------------------

 A :
   +1.0523   +0.0000i    +0.5713   -0.1581i    +0.1167   +0.0724i 
   +0.5713   +0.1581i    +0.4917   +0.0000i    -0.2083   -0.0160i 
   +0.1167   -0.0724i    -0.2083   +0.0160i    +0.6680   +0.0000i 

 cosh(A):
   +1.8732   +0.0000i    +0.5088   -0.1543i    +0.0399   +0.0911i 
   +0.5088   +0.1543i    +1.3738   +0.0000i    -0.1012   +0.0294i 
   +0.0399   -0.0911i    -0.1012   -0.0294i    +1.2682   +0.0000i 

 acosh(cosh(A)) = A :
   +1.0523   +0.0000i    +0.5713   -0.1581i    +0.1167   +0.0724i 
   +0.5713   +0.1581i    +0.4917   +0.0000i    -0.2083   -0.0160i 
   +0.1167   -0.0724i    -0.2083   +0.0160i    +0.6680   +0.0000i 


 Press   return to continue
 Press X return to stop