double var1 = pow(1000000000, 1 / 3.0);
double var2 = pow(1000000000 + 0.5L, 1 / 3.0);
cout << var1 << ' ' << var2 << '\n';
Sorry if this is very basic but I just wanted to test something and so I wrote this and the output was something like
999.9999999962
1000.000000016
So this is super stupid but this isn't anything wrong on my side right? Pow has just slight precision problems so I can just add 0.5 or something to fix this?