lundi 5 décembre 2016

Why does floor(pow(64,1.0/3)) return 3 in C++?

I need to find the floor nth root of a given number(x). x can be as large as 1e12 and n can be as large as 50. floor(pow(64,1.0/3)) returns 3, please help me with this problem, if not can you please suggest an alternative taking the keeping in mind?

Aucun commentaire:

Enregistrer un commentaire