+ 1

What is the difference between pow(64,1/3.0) and pow(64,1/3) ? C++

Float and Integer problems

9th May 2018, 1:26 PM
Prashant Mishra
Prashant Mishra - avatar
5 ответов
+ 1
It's just a rule. If one from arguments is double(float) result will be double(float)
9th May 2018, 2:04 PM
Eddie Nambulus
Eddie Nambulus - avatar
+ 2
1/3=0 1/3.0=0.(3)
9th May 2018, 1:33 PM
Eddie Nambulus
Eddie Nambulus - avatar
+ 1
But i still have 1 doubt ... 1/3.0 is in the form of int/float ... why the answer is in the form of float , why not int ?
9th May 2018, 1:36 PM
Prashant Mishra
Prashant Mishra - avatar
+ 1
Don't mention it.
9th May 2018, 2:05 PM
Eddie Nambulus
Eddie Nambulus - avatar
0
thanks a lot
9th May 2018, 2:04 PM
Prashant Mishra
Prashant Mishra - avatar