Mathc complexes/a121
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00a.c */
void fun(void)
double **A; 
double **LogA_EValue;
double **LogA;
double **Exp_LogA_EValue;
double **Exp_LogA;
double **V = i_mZ(RCA,RCA);
double **V_T = i_mZ(RCA,RCA);
double **EValue = i_mZ(RCA,RCA); 
double **T = i_mZ(RCA,RCA);
 clrscrn();
 A = rEcsymmetric_mZ(i_mZ(RCA,RCA),999,+1.E-3);
 printf(" Copy/Past into the octave window. \n\n");
 p_Octave_mZ(A,"A", P6, P6);
 printf(" logm (A)\n\n\n");
 stop(); 
 clrscrn();
 LogA_EValue = i_mZ(RCA,RCA); 
 LogA = i_mZ(RCA,RCA); 
 printf(" A :");
 p_mZ(A, S9,P4, S9,P4, C6);
 eigs_V_uv_mZ(A,V,FACTOR_E);
 ctranspose_mZ(V,V_T);
/* EValue = V_T * A * V */ 
 mul_mZ(V_T,A,T);
 mul_mZ(T,V,EValue); 
 f_eigs_uv_mZ(log,EValue, LogA_EValue);
 printf(" LogA_EValue :");
 p_mZ( LogA_EValue, S9,P4, S9,P4, C6);
/* Log_A = V * Log_EValue * V_T*/ 
 mul_mZ(V,LogA_EValue,T);
 mul_mZ(T,V_T,LogA); 
 printf(" LogA");
 p_mZ(LogA, S9,P4, S9,P4, C6);
 stop(); 
/* ================================================================== */ 
 clrscrn(); 
 printf(" Copy/Past into the octave window. \n\n");
 p_Octave_mZ(LogA, "LogA", P6, P6);
 printf(" expm (LogA)\n\n\n");
 stop(); 
 clrscrn();
 Exp_LogA_EValue = i_mZ(RCA,RCA); 
 Exp_LogA = i_mZ(RCA,RCA); 
 printf(" LogA :");
 p_mZ(LogA, S9,P4, S9,P4, C6);
 eigs_V_uv_mZ(LogA,V,FACTOR_E);
 ctranspose_mZ(V,V_T); 
/* LogA_EValue = V_T * LogA * V */ 
 mul_mZ(V_T,LogA,T);
 mul_mZ(T,V,LogA_EValue); 
 f_eigs_uv_mZ(exp,LogA_EValue, Exp_LogA_EValue);
 printf(" Exp_LogA_EValue :");
 p_mZ( Exp_LogA_EValue, S9,P4, S9,P4, C6);
/* A = V * Exp_LogA_EValue * V_T*/ 
 mul_mZ(V,Exp_LogA_EValue,T);
 mul_mZ(T,V_T,Exp_LogA); 
 printf(" Exp_LogA = A");
 p_mZ(Exp_LogA, S9,P4, S9,P4, C6);
 stop(); 
/* ================================================================== */ 
 clrscrn(); 
 printf(" A :");
 p_mZ(A, S9,P4, S9,P4, C6);
 printf(" Exp_LogA = A");
 p_mZ(Exp_LogA, S9,P4, S9,P4, C6); 
 f_mZ(A);
 f_mZ(LogA_EValue);
 f_mZ(LogA);
 f_mZ(V);
 f_mZ(V_T);
 f_mZ(EValue); 
 f_mZ(T);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
 Exp( Log(A) ) = A
 Exemple de sortie écran :
 Copy/Past into the octave window. 
 A=[
+1.122315+0.000000*i,+0.236506+0.312157*i,-0.497188+1.116935*i;
+0.236506-0.312157*i,+0.986247+0.000000*i,+0.423536+0.209517*i;
-0.497188-1.116935*i,+0.423536-0.209517*i,+3.284449+0.000000*i]
 logm (A)
 Press return to continue. 
 ------------------------------------
 A :
 +1.1223 +0.0000i +0.2365 +0.3122i -0.4972 +1.1169i 
 +0.2365 -0.3122i +0.9862 +0.0000i +0.4235 +0.2095i 
 -0.4972 -1.1169i +0.4235 -0.2095i +3.2844 +0.0000i 
 LogA_EValue :
 +1.3727 +0.0000i +0.0000 +0.0000i +0.0000 +0.0000i 
 +0.0000 +0.0000i -0.0065 +0.0000i +0.0000 +0.0000i 
 +0.0000 +0.0000i +0.0000 +0.0000i -0.7904 +0.0000i 
 LogA
 -0.3086 +0.0000i +0.2927 +0.2322i -0.3167 +0.6383i 
 +0.2927 -0.2322i -0.1222 +0.0000i +0.2126 +0.0191i 
 -0.3167 -0.6383i +0.2126 -0.0191i +1.0065 +0.0000i 
 Press return to continue. 
 ------------------------------------
 Copy/Past into the octave window. 
 LogA=[
-0.308591+0.000000*i,+0.292697+0.232246*i,-0.316749+0.638287*i;
+0.292697-0.232246*i,-0.122191+0.000000*i,+0.212557+0.019112*i;
-0.316749-0.638287*i,+0.212557-0.019112*i,+1.006507+0.000000*i]
 expm (LogA)
 Press return to continue. 
 LogA :
 -0.3086 +0.0000i +0.2927 +0.2322i -0.3167 +0.6383i 
 +0.2927 -0.2322i -0.1222 +0.0000i +0.2126 +0.0191i 
 -0.3167 -0.6383i +0.2126 -0.0191i +1.0065 +0.0000i 
 Exp_LogA_EValue :
 +3.9459 +0.0000i +0.0000 +0.0000i +0.0000 +0.0000i 
 +0.0000 +0.0000i +0.4537 +0.0000i +0.0000 +0.0000i 
 +0.0000 +0.0000i +0.0000 +0.0000i +0.9935 +0.0000i 
 Exp_LogA = A
 +1.1223 -0.0000i +0.2365 +0.3122i -0.4972 +1.1169i 
 +0.2365 -0.3122i +0.9862 -0.0000i +0.4235 +0.2095i 
 -0.4972 -1.1169i +0.4235 -0.2095i +3.2844 +0.0000i 
 Press return to continue. 
 ------------------------------------
 A :
 +1.1223 +0.0000i +0.2365 +0.3122i -0.4972 +1.1169i 
 +0.2365 -0.3122i +0.9862 +0.0000i +0.4235 +0.2095i 
 -0.4972 -1.1169i +0.4235 -0.2095i +3.2844 +0.0000i 
 Exp_LogA = A
 +1.1223 -0.0000i +0.2365 +0.3122i -0.4972 +1.1169i 
 +0.2365 -0.3122i +0.9862 -0.0000i +0.4235 +0.2095i 
 -0.4972 -1.1169i +0.4235 -0.2095i +3.2844 +0.0000i 
 Press return to continue
 Press X to stop

Mathc complexes/a122
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00a.c */
void fun(void)
int i;
double **A [tA]; 
double **ExpA_EValue[tA];
double **ExpA [tA];
double **V = i_mZ(RCA,RCA);
double **V_T = i_mZ(RCA,RCA);
double **EValue = i_mZ(RCA,RCA); 
double **T = i_mZ(RCA,RCA);
 for(i = C0; i < C3; i++)
 clrscrn();
 if(i < C2) 
 A[i] = rEcsymmetric_mZ(i_mZ(RCA,RCA),999,+1.E-3);
 else 
 A[i] = add_mZ(A[C0],A[C1],i_mZ(RCA,RCA));
 printf(" Copy/Past into the octave window. \n\n");
 pAi_Octave_mZ(A[i], "A",i, P6, P6);
 printf(" expm (A%d)\n\n\n",i);
 stop(); 
 clrscrn();
 ExpA_EValue[i] = i_mZ(RCA,RCA); 
 ExpA[i] = i_mZ(RCA,RCA); 
 printf(" A[%d] :",i);
 p_mZ(A[i], S11,P4, S11,P4, C4); 
 eigs_V_uv_mZ(A[i],V,FACTOR_E);
 ctranspose_mZ(V,V_T);
/* EValue = V_T * A * V */ 
 mul_mZ(V_T,A[i],T);
 mul_mZ(T,V,EValue); 
 f_eigs_uv_mZ(exp,EValue, ExpA_EValue[i]);
 printf(" ExpA_EValue[%d] :",i);
 p_mZ( ExpA_EValue[i], S11,P4, S11,P4, C4); 
/* ExpA[i] = V * ExpA_EValue[i] * V_T*/ 
 mul_mZ(V,ExpA_EValue[i],T);
 mul_mZ(T,V_T,ExpA[i]); 
 if(i < C2) printf(" ExpA[%d]",i); 
 else printf(" ExpA[%d] = ExpA[0+1]",i);
 p_mZ(ExpA[i], S11,P4, S11,P4, C4); 
 stop();
 clrscrn();
 printf(" Copy/Past into the octave window. \n\n"
 " expm (A0)*expm (A1) \n"
 " expm (A0+A1) \n\n");
 printf(" ExpA[0]*ExpA[1]");
 p_mZ( mul_mZ(ExpA[C0],ExpA[C1],T), S11,P4, S11,P4, C4); 
 printf(" ExpA[0+1] = ExpA[C2]"); 
 p_mZ( ExpA[C2], S11,P4, S11,P4, C4);
 printf(" ExpA[0] * ExpA[1] != ExpA[0 + 1] ??? \n\n");
 for(i = C0; i < C3; i++)
 f_mZ(A[i]);
 f_mZ(ExpA_EValue[i]);
 f_mZ(ExpA[i]);