Mathc initiation/c35cb
Installer et compiler ces fichiers dans votre répertoire de travail.
![]() |
c17b.c |
---|
/* ---------------------------------- */
/* save as c17b.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* --------------------------------- */
int main(void)
{
double ay,by,ny,
nx,nz,M;
clrscrn();
printf(" f : x,y,z -> %s\n\n", feq);
printf(" v : y,z -> %s \n", veq);
printf(" u : y,z -> %s\n\n", ueq);
printf(" t : y -> %s \n", teq);
printf(" s : y -> %s\n\n", seq);
ay = -1;
by = 1;
ny = 2*150; nx = 2*150; nz = 2*150;
M = trapezoid_dxdzdy( f,
ay,by,ny,
sz,tz,nz,
ux,vx,nx);
printf(" With the trapezoidal's rule.\n\n\n");
printf(" (%+.1f (%s (%s \n", by, teq, veq);
printf(" A = int( int( int( %s dx dz dy = %.6f\n",feq, M);
printf(" (%+.1f (%s (%s\n\n\n", ay, seq, ueq);
stop();
return 0;
}
/* --------------------------------- */
Exemple de sortie écran :
f : x,y,z -> 1
v : y,z -> 2-y-z
u : y,z -> 0
t : y -> sqrt(1-y**2)
s : y -> -sqrt(1-y**2)
With the trapezoidal's rule.
(+1.0 (sqrt(1-y**2) (2-y-z
A = int( int( int( 1 dx dz dy = 6.281905
(-1.0 (-sqrt(1-y**2) (0
Press return to continue.