Mathc complexes/03h
Installer et compiler ces fichiers dans votre répertoire de travail.
c02a.c |
---|
/* ------------------------------------ */
/* Save as : c02a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mZ(i_mZ(r,r),9.);
double **Act = i_mZ(r,r);
clrscrn();
printf(" A\n");
p_mZ(A, S3,P0, S3,P0, C6);
printf(" Act : Conjugate transpose\n");
p_mZ(ctranspose_mZ(A,Act), S3,P0, S3,P0, C6);
printf("\n conj_Z(det(A )) = ");
p_Z(conj_Z(det_Z(A)), S1,P0, S1,P0);
printf("\n det(Act) = ");
p_Z(det_Z(Act), S1,P0, S1,P0);
f_mZ(A);
f_mZ(Act);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(RC5)+RC1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
A
-9 -8i +8 +2i +2 -1i +5 +8i -4 +6i -8 +4i
-7 -5i +8 -7i +1 -8i +8 -5i -7 +7i -9 -8i
-6 -1i +2 +4i +2 -1i +4 -3i -7 +9i -8 +2i
-9 -3i +8 +8i -2 +5i +7 +8i -2 -4i +3 -7i
-5 -9i +8 -6i +4 -1i +7 +3i +9 +7i +3 +1i
+1 +7i +8 +7i +9 -4i -4 -3i -4 -8i -7 -4i
Act : Conjugate transpose
-9 +8i -7 +5i -6 +1i -9 +3i -5 +9i +1 -7i
+8 -2i +8 +7i +2 -4i +8 -8i +8 +6i +8 -7i
+2 +1i +1 +8i +2 +1i -2 -5i +4 +1i +9 +4i
+5 -8i +8 +5i +4 +3i +7 -8i +7 -3i -4 +3i
-4 -6i -7 -7i -7 -9i -2 +4i +9 -7i -4 +8i
-8 -4i -9 +8i -8 -2i +3 +7i +3 -1i -7 +4i
conj_Z(det(A )) = -484144+708184i
det(Act) = -484144+708184i
Press return to continue
Press X return to stop