Function to compute power function

In a format suitable for bootstrapping