函数nextpow2作用:
取最接近数据长度的2的整数次方
#include <math.h>//头文件
double x = 1000;
int NX = (int)pow(2, floor( log(x)/log((double)2) ));
函数nextpow2作用:
取最接近数据长度的2的整数次方
#include <math.h>//头文件
double x = 1000;
int NX = (int)pow(2, floor( log(x)/log((double)2) ));