Sommaire
Installer ce fichier dans votre répertoire de travail.
Les fonctions f(x)
|
fa.h
|
/* ---------------------------------- */
/* save as fa.h */
/* ---------------------------------- */
double f(
double x)
{
return(x + 1.);
}
char feq[] = "x + 1.";
/* ---------------------------------- */
double Df(
double x)
{
return(1.);
}
char Dfeq[] = "1.";
/* ---------------------------------- */
double ds(
double x)
{
return( sqrt(1. + pow(fx_x(f,x,H),2)) );
}
/* ---------------------------------- */
/* ---------------------------------- */
|
|
fb.h
|
/* ---------------------------------- */
/* save as fb.h */
/* ---------------------------------- */
double f(
double x)
{
return(x*x);
}
char feq[] = "x**2";
/* ---------------------------------- */
double Df(
double x)
{
return(2.*x);
}
char Dfeq[] = "2.*x";
/* ---------------------------------- */
double ds(
double x)
{
return( sqrt(1. + pow(fx_x(f,x,H),2)) );
}
/* ---------------------------------- */
/* ---------------------------------- */
|
|
fc.h
|
/* ---------------------------------- */
/* save as fc.h */
/* ---------------------------------- */
double f(
double x)
{
return(sin(x));
}
char feq[] = "sin(x)";
/* ---------------------------------- */
double Df(
double x)
{
return(cos(x));
}
char Dfeq[] = "cos(x)";
/* ---------------------------------- */
double ds(
double x)
{
return( sqrt(1. + pow(fx_x(f,x,H),2)) );
}
/* ---------------------------------- */
/* ---------------------------------- */
|
|
fd.h
|
/* ---------------------------------- */
/* save as fd.h */
/* ---------------------------------- */
double f(
double x)
{
return(log(x));
}
char feq[] = "log(x)";
/* ---------------------------------- */
double Df(
double x)
{
return(1./x);
}
char Dfeq[] = "1./x";
/* ---------------------------------- */
double ds(
double x)
{
return( sqrt(1. + pow(fx_x(f,x,H),2)) );
}
/* ---------------------------------- */
/* ---------------------------------- */
|