As far as i know, when you apply the power function, it crosses the limit of integer. And shows you the result after that.
You must take care of memory sizes provided to different data types.