阅读(389) (2)

log10

2015-11-11 15:40:05 更新

 原型:extern float log10(float x);
 
 用法:#include <math.h>
 
 功能:计算x的常用对数。
 
 说明:x的值应大于零。
 
 举例:

     // log10.c
     
     #include <syslib.h>
     #include <math.h>
     main()
     {
       float x;
       clrscr();        // clear screen
       textmode(0x00);  // 6 lines per LCD screen
     
       printf("lg(5)=%f\n", log10(5.0));
       
       getchar();
       return 0;
     }