Explorar o código

Avoid overflow when computing pi

Cédric Augonnet %!s(int64=15) %!d(string=hai) anos
pai
achega
b42f38c8b2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)