frexp

来自cppreference.com
跳转到: 导航, 搜索

语法:

    #include <cmath>
    double frexp( double num, int* exp );

函数 frexp() 用来将num分解成两部分:一个介于0.5至1间的尾数(mantissa)(由函数返回)和有exp返回的指数。 科学计数法工作方式如下:

     num = 尾数 * (2 ^ exp)

C++ 也提供了下列重载形式:

    #include <cmath>
    float frexp( float num, int* exp ); // same as frexpf() in C99
    long double frexp( long double num, int* exp ); // same as frexpl() in C99

相关主题: ldexp, modf

个人工具
名字空间
操作
导航
工具箱
其他语言