Mathc complexes/03l
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA RC4
#define CX C1
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double x_B[RCA*(CX*C2)]={
+1,+1,
+2,+2,
+3,+3,
+4,+4
};
double b[RCA*(RCA*C2)]={
+1,+2, +2,+5, +6,+2, +6,+5,
+3,+3, +2,+4, +1,+3, +6,+4,
+5,+4, +5,+3, +3,+4, +6,+3,
+5,+5, +5,+2, +2,+5, +4,+2
};
double **B = ca_A_mZ(b, i_mZ(RCA,RCA));
double **X_B = ca_A_mZ(x_B, i_mZ(RCA,CX));
double **X_S = mul_mZ(B,X_B, i_mZ(RCA,CX));
clrscrn();
printf(" B is the base change matrix for base \"B\" \n\n"
" B :");
p_mZ(B, S10,P2, S8,P2, C4);
printf(" x_B : (x in the base B)");
p_mZ(X_B, S10,P2, S8,P2, C4);
printf(" x_S = B x_B : (x in the Standard basis)");
p_mZ(X_S, S10,P2, S8,P2, C4);
stop();
f_mZ(B);
f_mZ(X_B);
f_mZ(X_S);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Introduisons la valeur de x en base standard dans le prochain fichier.
Exemple de sortie écran :
B is the base change matrix for base "B"
B :
+1.00 +2.00i +2.00 +5.00i +6.00 +2.00i +6.00 +5.00i
+3.00 +3.00i +2.00 +4.00i +1.00 +3.00i +6.00 +4.00i
+5.00 +4.00i +5.00 +3.00i +3.00 +4.00i +6.00 +3.00i
+5.00 +5.00i +5.00 +2.00i +2.00 +5.00i +4.00 +2.00i
x_B : (x in the base B)
+1.00 +1.00i
+2.00 +2.00i
+3.00 +3.00i
+4.00 +4.00i
x_S = B x_B : (x in the Standard basis)
+9.00 +85.00i
-2.00 +70.00i
+14.00 +82.00i
+5.00 +69.00i
Press return to continue.