Mathc complexes/a268
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00i.c |
---|
/* ------------------------------------ */
/* Save as : c00i.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **u = r_mZ(i_mZ(r,C1),9.);
double **v = r_mZ(i_mZ(r,C1),9.);
double **kv = i_mZ(r,C1);
double k = r_I(9);
clrscrn();
printf(" u :");
p_mZ(u,S3,P0,S3,P0,C6);
printf(" v :");
p_mZ(v,S3,P0,S3,P0,C6);
printf(" k*v :");
p_mZ(smul_mZ(k,v,kv),S3,P0,S3,P0,C6);
printf(" k<u,v> = <u,kv> \n\n");
printf(" k<u,v> =");
p_Z(smul_Z(k,dot_Z(u,v)), S5,P0, S4,P0);printf("\n\n");
printf(" <u,kv> =");
p_Z(dot_Z(u,kv), S5,P0, S4,P0);printf("\n");
f_mZ(u);
f_mZ(v);
f_mZ(kv);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R2)+R1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
u :
+2 +8i
-8 -3i
+4 -3i
v :
-9 -3i
+5 +7i
+5 +9i
k*v :
-27 -9i
+15+21i
+15+27i
k<u,v> = <u,kv>
k<u,v> = -330-228i
<u,kv> = -330-228i
Press return to continue
Press X return to stop