Mathc complexes/a118
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define FACTOR_E +1.E-2
#define RCA RC4
#define Pn 3
/* ------------------------------------ */
/* ------------------------------------ */
double f(
double x)
{
return(pow(x,1./Pn));
}
char feq[] = "x**1/Pn";
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double **A = rcsymmetric_mRZ(i_mZ(RCA,RCA),99.);
double **A_Pn = i_mZ(RCA,RCA);
double **EigsVector = i_mZ(RCA,RCA);
double **T_EigsVector = i_mZ(RCA,RCA);
double **EigsValue = i_mZ(RCA,RCA);
double **f_EigsValue = i_mZ(RCA,RCA);
double **T1 = i_mZ(RCA,RCA);
clrscrn();
printf(" A ");
p_mRZ(A, S8,P0, C6);
eigs_V_mZ(A,EigsVector,FACTOR_E);
transpose_mZ(EigsVector,T_EigsVector);
/* EigsValue : T_EigsVector * A * EigsVector */
mul_mZ(T_EigsVector,A,T1);
mul_mZ(T1,EigsVector,EigsValue);
f_eigs_mZ(f,EigsValue,f_EigsValue);
//A == EigsVector * EigsValue * T_EigsVector
mul_mZ(EigsVector,f_EigsValue,T1);
mul_mZ(T1,T_EigsVector,A_Pn);
printf(" A_Pn = A**(1/%d) = EigsVector * EigsValue**(1/%d)"
" * T_EigsVector\n", Pn, Pn);
p_mRZ(A_Pn,S10,P4,C6);
printf(" A = A_Pn**%d ",Pn);
p_mRZ(pow_mZ(Pn,A_Pn,T1), S8,P0, C6);
f_mZ(A);
f_mZ(A_Pn);
f_mZ(EigsVector);
f_mZ(T_EigsVector);
f_mZ(EigsValue);
f_mZ(f_EigsValue);
f_mZ(T1);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
A**(1/3) == V * EValue**(1/3) * T_V
Exemple de sortie écran :
------------------------------------
A
+3530 +6946 +4551 +1247
+6946 +15417 +11733 +6870
+4551 +11733 +10999 +9945
+1247 +6870 +9945 +19317
A_Pn = A**(1/3) = EigsVector * EigsValue**(1/3) * T_EigsVector
+9.1381 +7.6805 +2.5368 -0.8878
+7.6805 +19.3141 +9.1352 +2.1710
+2.5368 +9.1352 +15.4858 +6.3291
-0.8878 +2.1710 +6.3291 +25.2532
A = A_Pn**3
+3530 +6946 +4551 +1247
+6946 +15417 +11733 +6870
+4551 +11733 +10999 +9945
+1247 +6870 +9945 +19317
Press return to continue
Press X to stop