It’s a problem of using floats vs doubles here. On my machine:

```
#include <cstdio>
int main() {
float fa = 1080/(float)600;
double da = 1080/(double)600;
printf("%.10f \n%.10f \n",fa, da);
return 0;
}
```

prints:

1.7999999523

1.8000000000

What you should also know is that such differences are *expected* in numerical computations. One thing is whether the numbers are stored as floats or as doubles, another is how the computations are implemented. IEEE754 doesn’t define the exact results of various functions, only the bit representation of numbers. Such small differences are exactly why floating point numbers should *always* be measured with a certain epsilon.

Additionally, CUDA implements division in a non-standard way using fast reciprocal.

Floating point computations carried out by programs compiled with different compilers (not to mention running on radically different hardware) *will* come out slightly different and one has to live with it.