frexp
来自cppreference.com
< cpp | numeric/math
语法:
#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