simplifying experssions of the form a to the p over q

simplifying expressions of the form a to the p over q
simplifying expressions of the form a to the p over q