⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c03b4c.c

📁 c源码
💻 C
字号:
/*         .c                       freeware                   xhunga@tiscali.fr
*/
/* --------------------------------- INCLUDES ------------------------------- */
#include "xa_hfile.h"
#include    "f___4.h"
/* --------------------------------- MAIN ----------------------------------- */
int main(void)
{
double (*P_f)(double x);
double (*PDf)(double x);

double c = 0.5;
double t;
/*-------------------------------- PROGRAM ---------------------------------- */
 P_f =  f;
 PDf = Df;

 clrscrn();
 printf("  f : x-> %s\n", feq);
 printf(" Df : x-> %s\n\n",Dfeq);

 printf(" With c = %0.3f, the equation of the tangent is :\n\n",c);
 printf("       Df(c) (x-c) + f(c) = ");
 eq_Tan(  c,
       (*P_f),
       (*PDf)
       );

 printf("\n\n the equation of the  normal is :\n\n");
 printf("    -1/Df(c) (x-c) + f(c) =");
 eqNorm(  c,
       (*P_f),
       (*PDf)
       );
 printf("\n\n\n");

 printf(" Find at c = %0.3f,",c);
 printf(" the intersection points of the normal with the x-y axis.\n\n");

 t = ((*P_f)(c));
 printf(" P(%6.3f, %6.3f)           P(             c,           f(c))\n\n", c, t);

 t = c+((*P_f)(c))*((*PDf)(c));
 printf(" A(%6.3f, %6.3f)           A(c + f(c) Df(c),              0)\n", t, 0.);

 t = ((*P_f)(c))+c/((*PDf)(c));
 printf(" B(%6.3f, %6.3f)           B(             0, f(c) + c/Df(c))\n",0., t);

   gplt_Norm_xy(-4,      /* xmin  plot [xmin:xmax] [ymin:ymax] */
                 4,      /* xmax  */
                -4,      /* ymin  */
                 4,      /* ymax  */
                 c,
               feq,
         (*P_f),
         (*PDf)
              );

 printf("\n\n");
 printf(" To see the graph, open the file \"f_Df.plt\" with Gnuplot.\n\n");

 printf(" Press return to continue\n");
 getchar();

 return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -