Why does
cout << floor(pow(1000000000,1.0/3))<<nl;
give 999? It should be 1000.
This
cout << floor(powf(1000000000,1.0/3))<<nl;
gives 1000, but I do not understand why the first gives weird answer.
I saw someone having same trouble in sql here: I have a question about sql function: floor() But I do not know SQL so I couldn't understand the response.