Mathc initiation/Fichiers c : c48cc

Un livre de Wikilivres.


Sommaire


Installer et compiler ces fichiers dans votre répertoire de travail.

c02c.c
/* ---------------------------------- */
/* save as c02c.c                     */
/* ---------------------------------- */
#include "x_hfile.h"
#include       "fa.h"
/* ---------------------------------- */
int main(void)
{
double i;

 clrscrn();
 printf(" The line y = a x + b              (a!=0)                \n\n");
 printf(" is an asymptote at the curve of f at oo+ (or oo-) if :\n\n\n");
 printf("  lim    f(x)                lim    [f(x)-a*x] = b      \n");
 printf("  x->+oo ----  = a    and    x->+oo                     \n");
 printf("          x                                         \n\n\n");
 printf("                            or                      \n\n\n");
 printf("  lim    f(x)                lim    [f(x)-a*x] = b      \n");
 printf("  x->-oo ----  = a    and    x->-oo                     \n");
 printf("          x                                         \n\n\n");

 stop();

 clrscrn();
 printf(" f : x-> %s\n\n\n", feq);
 printf(" Compute :   lim   [f(x)-a*x] = b      (with a = 2)  \n");
 printf("             x->+oo           \n\n\n");

 for(i=1; i<10; i+=1)
     printf(" L2(%+.0f) = %5.3f  || L2(%+.0f) = %.3f\n",
     i*100,    f_b(i*100),
     i*1000000000,f_b(i*1000000000)
     );
          
 printf("\n\n");
 printf(" The computation gives the impression of  :  b = %.3f\n\n", 
          f_b(i*1000000000)); 
 
 stop();

 return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */


Exemple de sortie écran :

 The line y = a x + b              (a!=0)                

 is an asymptote at the curve of f at oo+ (or oo-) if :


  lim    f(x)                lim    [f(x)-a*x] = b      
  x->+oo ----  = a    and    x->+oo                     
          x                                         


                            or                      


  lim    f(x)                lim    [f(x)-a*x] = b      
  x->-oo ----  = a    and    x->-oo                     
          x                                         


 Press return to continue.

Exemple de sortie écran :

 f : x-> x+1.+sqrt(x*x-3.*x+2.)


 Compute :   lim   [f(x)-a*x] = b      (with a = 2)  
             x->+oo           


 L2(+100) = -0.501  || L2(+1000000000) = -0.500
 L2(+200) = -0.501  || L2(+2000000000) = -0.500
 L2(+300) = -0.500  || L2(+3000000000) = -0.500
 L2(+400) = -0.500  || L2(+4000000000) = -0.500
 L2(+500) = -0.500  || L2(+5000000000) = -0.500
 L2(+600) = -0.500  || L2(+6000000000) = -0.500
 L2(+700) = -0.500  || L2(+7000000000) = -0.500
 L2(+800) = -0.500  || L2(+8000000000) = -0.500
 L2(+900) = -0.500  || L2(+9000000000) = -0.500


 The computation gives the impression of  :  b = -0.500

 Press return to continue.