Mathc matrices/c11gn
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
/* ------------------------------------ */
double f(
double x)
 return(sin(x)*sin(x));
char feq[] = "sin(x)*sin(x)";
double g(
double x)
 return(cos(x)*cos(x));
char geq[] = "cos(x)*cos(x)";
/* ------------------------------------ */
void fun(void)
double **A = rsymmetric_mR(i_mR(RCA,RCA),999.);
double **sin_A = i_mR(RCA,RCA);
double **cos_A = i_mR(RCA,RCA);
double **Ide = i_mR(RCA,RCA);
double **EigsVector = i_mR(RCA,RCA);
double **T_EigsVector = i_mR(RCA,RCA);
double **EigsValue = i_mR(RCA,RCA);
double **sin_EigsValue = i_mR(RCA,RCA);
double **cos_EigsValue = i_mR(RCA,RCA);
double **T1 = i_mR(RCA,RCA);
 clrscrn();
 printf(" A :");
 p_mR(A,S10,P4,C6); 
 stop();
 clrscrn();
 eigs_V_uv_mR(A,EigsVector); 
 transpose_mR(EigsVector,T_EigsVector);
/* EigsValue : T_EigsVector * A * EigsVector */
 mul_mR(T_EigsVector,A,T1);
 mul_mR(T1,EigsVector,EigsValue); 
 f_eigs_uv_mR(f,EigsValue,sin_EigsValue);
 f_eigs_uv_mR(g,EigsValue,cos_EigsValue);
//A == EigsVector * EigsValue * T_EigsVector 
 mul_mR(EigsVector,sin_EigsValue,T1);
 mul_mR(T1,T_EigsVector,sin_A); 
 printf(" sin(A)**2");
 p_mR(sin_A,S10,P4,C6); 
//A == EigsVector * EigsValue * T_EigsVector 
 mul_mR(EigsVector,cos_EigsValue,T1);
 mul_mR(T1,T_EigsVector,cos_A);
 printf(" cos(A)**2");
 p_mR(cos_A,S10,P4,C6); 
 add_mR(sin_A,cos_A,Ide);
 printf(" Ide : cos(A)**2 + sin(A)**2");
 p_mR(Ide,S10,P4,C6); 
 f_mR(A);
 f_mR(sin_A);
 f_mR(cos_A);
 f_mR(Ide);
 f_mR(EigsVector);
 f_mR(T_EigsVector);
 f_mR(EigsValue);
 f_mR(cos_EigsValue); 
 f_mR(sin_EigsValue); 
 f_mR(T1);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
 Ide = cos(A)**2 + sin(A)**2

Exemple de sortie écran :
 A :
 +143.0000 -684.0000 -726.0000 -534.0000 -425.0000 
 -684.0000 -504.0000 +583.0000 +871.0000 +398.0000 
 -726.0000 +583.0000 -638.0000 +110.0000 -639.0000 
 -534.0000 +871.0000 +110.0000 +947.0000 +584.0000 
 -425.0000 +398.0000 -639.0000 +584.0000 -925.0000 
 Press return to continue. 
 ------------------------------------ 
 sin(A)**2
 +0.6908 -0.1188 +0.1102 -0.1057 -0.1737 
 -0.1188 +0.5686 +0.0103 +0.1863 -0.0077 
 +0.1102 +0.0103 +0.6344 +0.1702 -0.0023 
 -0.1057 +0.1863 +0.1702 +0.7645 -0.0295 
 -0.1737 -0.0077 -0.0023 -0.0295 +0.7299 
 cos(A)**2
 +0.3092 +0.1188 -0.1102 +0.1057 +0.1737 
 +0.1188 +0.4314 -0.0103 -0.1863 +0.0077 
 -0.1102 -0.0103 +0.3656 -0.1702 +0.0023 
 +0.1057 -0.1863 -0.1702 +0.2355 +0.0295 
 +0.1737 +0.0077 +0.0023 +0.0295 +0.2701 
 Ide : cos(A)**2 + sin(A)**2
 +1.0000 -0.0000 -0.0000 -0.0000 +0.0000 
 -0.0000 +1.0000 +0.0000 +0.0000 +0.0000 
 -0.0000 +0.0000 +1.0000 +0.0000 +0.0000 
 -0.0000 +0.0000 +0.0000 +1.0000 -0.0000 
 +0.0000 +0.0000 +0.0000 -0.0000 +1.0000 
 Press return to continue
 Press X to stop

Mathc matrices/c11hn
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00b.c */
/* ------------------------------------ */
double f(
double x)
 return(cos(2*x));
char feq[] = "cos(2*x)";
double g(
double x)
 return(2*cos(x)*cos(x)-1);
char geq[] = "2*cos(x)**2)-1";
/* ------------------------------------ */
void fun(void)
double **A = rsymmetric_mR(i_mR(RCA,RCA),999.);
double **cos2_A = i_mR(RCA,RCA);
double **coscosmns1_A = i_mR(RCA,RCA);
double **EigsVector = i_mR(RCA,RCA);
double **T_EigsVector = i_mR(RCA,RCA);
double **EigsValue = i_mR(RCA,RCA);
double **cos2A_EigsValue = i_mR(RCA,RCA);
double **coscosmns1_EigsValue = i_mR(RCA,RCA);
double **T1 = i_mR(RCA,RCA);
 clrscrn();
 printf(" A :");
 p_mR(A,S10,P4,C6); 
 stop();
 clrscrn();
 eigs_V_uv_mR(A,EigsVector); 
 transpose_mR(EigsVector,T_EigsVector);
/* EigsValue : T_EigsVector * A * EigsVector */
 mul_mR(T_EigsVector,A,T1);
 mul_mR(T1,EigsVector,EigsValue); 
 f_eigs_uv_mR(f,EigsValue,cos2A_EigsValue);
 f_eigs_uv_mR(g,EigsValue,coscosmns1_EigsValue);
 //A == EigsVector * EigsValue * T_EigsVector 
 mul_mR(EigsVector,cos2A_EigsValue,T1);
 mul_mR(T1,T_EigsVector,cos2_A); 
 printf(" cos(2*A)");
 p_mR(cos2_A,S10,P4,C6); 
//A == EigsVector * EigsValue * T_EigsVector 
 mul_mR(EigsVector,coscosmns1_EigsValue,T1);
 mul_mR(T1,T_EigsVector,coscosmns1_A);
 printf(" 2*cos(A)**2-1");
 p_mR(coscosmns1_A,S10,P4,C6); 
 f_mR(A);
 f_mR(cos2_A);
 f_mR(coscosmns1_A);
 f_mR(EigsVector);
 f_mR(T_EigsVector);
 f_mR(EigsValue);
 f_mR(coscosmns1_EigsValue); 
 f_mR(cos2A_EigsValue); 
 f_mR(T1);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
 cos(2*A) = 2*cos(A)**2-1

Exemple de sortie écran :
 A :
 +781.0000 -555.0000 -738.0000 -666.0000 -7.0000 
 -555.0000 -387.0000 -45.0000 +83.0000 +996.0000 
 -738.0000 -45.0000 +207.0000 +78.0000 +323.0000 
 -666.0000 +83.0000 +78.0000 -391.0000 -462.0000 
 -7.0000 +996.0000 +323.0000 -462.0000 -907.0000 
 Press return to continue. 
 cos(2*A)
 +0.7610 -0.1953 -0.2089 +0.1112 -0.1504 
 -0.1953 -0.0576 +0.1319 +0.3938 -0.3194 
 -0.2089 +0.1319 +0.3456 +0.2168 +0.0344 
 +0.1112 +0.3938 +0.2168 +0.3295 +0.3270 
 -0.1504 -0.3194 +0.0344 +0.3270 -0.1389 
 2*cos(A)**2-1
 +0.7610 -0.1953 -0.2089 +0.1112 -0.1504 
 -0.1953 -0.0576 +0.1319 +0.3938 -0.3194 
 -0.2089 +0.1319 +0.3456 +0.2168 +0.0344 
 +0.1112 +0.3938 +0.2168 +0.3295 +0.3270 
 -0.1504 -0.3194 +0.0344 +0.3270 -0.1389 
 Press return to continue
 Press X to stop