Mathc initiation/Fichiers h : c23a5

Un livre de Wikilivres.



Sommaire


Installer ce fichier dans votre répertoire de travail.


k_nor.h
utilitaire
/* ------------------------------------ */
/*  Save as :    k_nor.h                */
/* ------------------------------------
   y = ax + b   


   a = -1./f'(x)

   b = y - ax
   b = y    - (-1./f'(x)) x
   b = f(x) - (-1./f'(x)) x

   x=c
   a = -1./f'(c)
   b = f(c) - (-1./f'(c)) c
   ------------------------------------ */
void eq_Norm(
double    c,
double (*P_f)(double x),
double (*PDf)(double x)
)
{
 printf(" %0.3f*x %+0.3f\n\n\n", 
 
/*   a = -1./f'(x)                      */
        -1./(*PDf)(c), 
        
/*   b = f(c)     -  (-1./f'(c)     c)  */        
        (*P_f)(c) -  (-1./(*PDf)(c)*c) );
}
/* ------------------------------------ */
/* ------------------------------------ */
void eq_norm(
double    c,
double (*P_f)(double x)
)
{
 printf(" %0.3f*x %+0.3f\n\n\n", 
 
/*   a = -1./f'(x)                     */
         -1./fx_x((*P_f),c,H),
            
/*   b = f(c) -  (-1./f'(c) )        c */
 (*P_f)(c) -  (-1./fx_x((*P_f),c,H)) * c
        );
}
/* ------------------------------------ */
/* ------------------------------------ */


Dans ce fichier il y a les fonctions pour calculer les normales.