The built-in Math.Pow()
function in .NET raises a double
base to a double
exponent and returns a double
result.
What's the best way to do the same with integers?
Added: It seems that one can just cast Math.Pow()
result to (int), but will this always produce the correct number and no rounding errors?