Improved simplifyMathFunctions when simplifying special cases of pow(x,y)-function.