the power function gives zero with %d but works fine with %f. why?