Pow is a double
function, not an int
eger. As such, it has small rounding errors, and probably calculates 99.999999996375 or so. When you assign it to an int
, you lose all data behind the decimal point.
Use doubles for your values, and print doubles (”%lf”
), and it will work.