标签:
一、数学计算
#include <math.h>
1、上取整 double ceil(double)
int num; int batchsize = 1000; int batchnum = static_cast<int>(ceil((double)num/batchsize));
2、下取整 double floor(double)
二、计时
#include <windows.h>
clock_t start,end; start = clock(); .... end = clock(); double miaoshu = (double)(end-start) / CLOCKS_PER_SEC;
三、
标签:
原文地址:http://www.cnblogs.com/deepblueme/p/4600916.html