Mathc complexes/a266
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00g.c |
---|
/* ------------------------------------ */
/* Save as : c00g.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 **w = r_mZ(i_mZ(r,C1),9.);
double **vmnsw = i_mZ(r,C1);
clrscrn();
printf(" u :");
p_mZ(u,S3,P0,S3,P0,C6);
printf(" v :");
p_mZ(v,S3,P0,S3,P0,C6);
printf(" v-w :");
p_mZ(sub_mZ(v,w,vmnsw),S3,P0,S3,P0,C6);
printf(" <u,v-w> = <u,v>-<u,w> \n\n");
printf(" <u,v-w> =");
p_Z(dot_Z(u,vmnsw), S5,P0, S4,P0);printf("\n\n");
printf(" <u,v>-<u,w> =");
p_Z(sub_Z(dot_Z(u,v),dot_Z(u,w)), S5,P0, S4,P0);printf("\n");
f_mZ(u);
f_mZ(v);
f_mZ(w);
f_mZ(vmnsw);
}
/* ------------------------------------ */
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 +5i
+9 -6i
-8 +6i
v :
-1 +2i
-7 +1i
-3 -7i
v-w :
-7+11i
-11 +4i
-4 +1i
<u,v-w> = <u,v>-<u,w>
<u,v-w> = -16 +1i
<u,v>-<u,w> = -16 +1i
Press return to continue
Press X return to stop