Parcourir la source

Avoid overflow when computing pi

Cédric Augonnet il y a 15 ans
Parent
commit
b42f38c8b2
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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)