I'm still not clear what this means:
"Explain why pow(4,1/2) gives 1.0, but pow(4,0.5) gives 2.0 where pow(x,y) is the library function that calculates xy."
I know that the second argument of pow( 4, 1/2 ) is not "one-half". It is 1 divided by 2. That is not the same as 0.5 since the compiler sees 1 as an integer and 1.0 as a float. So in C, 1.0 / 2.0 == 0.5, but 1 / 2 == 0.
Yeah I understand all the above.....It's the bit about the lirary function I don't uderstand?
Can anyone explain this to me?
Cheers.
Gaz.