阅读(4679) (0)

ldexp

2015-11-11 15:37:53 更新

 原型:extern float ldexp(float x, int exp);
 
 用法:#include <math.h>
 
 功能:装载浮点数。
 
 说明:返回x*2^exp的值。
 
 举例:

     // ldexp.c
     
     #include <syslib.h>
     #include <math.h>
     main()
     {
       float x;
       
       clrscr();        // clear screen
       textmode(0x00);  // 6 lines per LCD screen
     
       x=ldexp(1.0,6);  // 1.0*2^6
       printf("2^6=%.2f",x);
       
       getchar();
       return 0;
     }