소스 검색

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)