Mathc matrices/cq062
Installer et compiler ces fichiers dans votre répertoire de travail.
c00c.c |
---|
/* ------------------------------------ */
/* Save as : c00c.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **u = r_mR(i_mR(r,C1),9.);
double **v = r_mR(i_mR(r,C1),9.);
double **ku = i_mR(r,C1);
double k = r_I(9);
clrscrn();
printf(" u :");
p_mR(u,S3,P0,C6);
printf(" v :");
p_mR(v,S3,P0,C6);
printf(" k*u :");
p_mR(smul_mR(k,u,ku),S3,P0,C6);
stop();
clrscrn();
printf(" <ku,v> = k<u,v> [Homogeneity axiom] \n\n");
printf(" <ku,v> = %.0f \n", dot_R(ku,v));
printf(" k<u,v> = %.0f \n\n", k*dot_R( u,v));
f_mR(u);
f_mR(v);
f_mR(ku);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
u :
-9
+1
+7
v :
+7
-7
+1
k*u :
+72
-8
-56
Press return to continue.
<ku,v> = k<u,v> [Homogeneity axiom]
<ku,v> = 504
k<u,v> = 504
Press return to continue
Press X to stop