Implementation math power function