浏览代码

Avoid overflow when computing pi

Cédric Augonnet 15 年之前
父节点
当前提交
b42f38c8b2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/pi/pi_redux.c

+ 1 - 1
examples/pi/pi_redux.c

@@ -32,7 +32,7 @@
 #define NSHOT_PER_TASK	(1024*1024)
 
 /* default value */
-static unsigned ntasks = 1024;
+static unsigned long ntasks = 1024;
 
 /*
  *	Initialization of the Random Number Generators (RNG)