Mathc complexes/a287
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00d.c |
---|
/* ------------------------------------ */
/* Save as : c00d.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mZ( i_mZ(r,r),9.);
double **Aadjoint = adjoint_mZ(A, i_mZ(r,r) );
double **B = r_mZ( i_mZ(r,r),9.);
double **Badjoint = adjoint_mZ(B, i_mZ(r,r) );
double **AB = mul_mZ(A,B, i_mZ(r,r) );
double **ABadjoint = adjoint_mZ(AB, i_mZ(r,r) );
double **BadjointAadjoint = mul_mZ(Badjoint,Aadjoint, i_mZ(r,r) );
clrscrn();
printf(" A :");
p_mZ(A,S4,P0, S3,P0, C6);
printf(" B :");
p_mZ(B,S4,P0, S3,P0, C6);
stop();
clrscrn();
printf(" Adjoint(A) :");
p_mZ(Aadjoint, S6,P0, S5,P0, C6);
printf(" Adjoint(B) :");
p_mZ(Badjoint, S6,P0, S5,P0, C6);
stop();
clrscrn();
printf(" adjoint(AB) :");
p_mZ(ABadjoint, S9,P0, S8,P0, C6);
printf(" adjoint(B) * adjoint(A) :");
p_mZ(BadjointAadjoint, S9,P0, S8,P0, C6);
f_mZ(A);
f_mZ(Aadjoint);
f_mZ(B);
f_mZ(Badjoint);
f_mZ(AB);
f_mZ(ABadjoint);
f_mZ(BadjointAadjoint);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(RC3)+RC1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
adjoint(AB) = adjoint(B) * adjoint(A) Exemple de sortie écran :
A :
-8 -3i -2 +1i -7 -7i
+8 -3i +3 +9i +8 -1i
+6 -5i +1 +9i +6 -5i
B :
-8 -8i +2 -7i -2 +5i
+8 +2i +1 +9i +5 -4i
-6 +2i -9 +7i -1 +8i
Press return to continue.
Adjoint(A) :
+46 -32i +63 -86i -57 +94i
+10 +12i +14 +29i -10 -19i
-28 +30i -26 +91i +16 -95i
Adjoint(B) :
-56 -72i -71 -82i +29 -30i
+2 -28i +70 -22i +46 +44i
-62 +90i -126 +30i +34 -28i
Press return to continue.
adjoint(AB) :
-4518 -1482i -6360 +492i +6726 -2226i
-2448 -584i -5864 +2828i +6316 -2992i
-1704 +6716i +2864 +11590i -5212 -12542i
adjoint(B) * adjoint(A) :
-4518 -1482i -6360 +492i +6726 -2226i
-2448 -584i -5864 +2828i +6316 -2992i
-1704 +6716i +2864 +11590i -5212 -12542i
Press return to continue
Press X return to stop