Mathc initiation/Fichiers h : c50fb
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b.c |
|---|
/* --------------------------------- */
/* save as c00b.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* --------------------------------- */
int main(void)
{
double c = .5;
clrscrn();
printf(" f : x-> %s\n"
" Df : x-> %s\n\n"
" g : x-> %s\n"
" Dg : x-> %s\n\n\n", feq, Dfeq, geq, Dgeq);
printf(" Compute the derivative of f and g with their definitions\n"
" and the function fx_x(); when x = %0.3f\n\n", c);
printf(" with Df(%0.3f) = %0.8f \n",c, Df(c));
printf(" with fx_x(%0.3f) = %0.8f \n\n",c, fx_x(f,c,H));
printf(" with Dg(%0.3f) = %0.8f \n",c, Df(c));
printf(" with fx_x(%0.3f) = %0.8f\n\n\n",c, fx_x(g,c,H));
printf(" Remark : f(x) and f(x) + C have the same derivative\n\n");
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Exemple de sortie écran :
f : x-> atan(x)
Df : x-> 1/(x**2+1)
g : x-> atan(x) + 5
Dg : x-> 1/(x**2+1)
Compute the derivative of f and g with their definitions
and the function fx_x(); when x = 0.500
with Df(0.500) = 0.80000000
with fx_x(0.500) = 0.80000000
with Dg(0.500) = 0.80000000
with fx_x(0.500) = 0.80000000
Remark : f(x) and f(x) + C have the same derivative
Press return to continue.