hello,

i’m new in CUDA, i wrote a program to determine the number of PI

```
__global__ void Pi(float* out, long N, int nthreads, int nblocks)
{
float i;
float x;
float licznik = 4.0;
int idx = blockIdx.x*blockDim.x+threadIdx.x;
if (idx%2!=0)
licznik = -4.0;
for (i = idx; i <= N; i += nthreads * nblocks)
{
out[idx] += licznik/(2 * i + 1);
}
}
...
```

gets strange results:

N = 1000 Pi = 3.1425914764404297

N = 1000000 Pi = 3.1415917873382568

N = 1000000000 Pi = 3.1412153244018555

N = 10000000000 Pi = 3.1409137248992920

anyone know why?