polishing funm, expm, logm and mpower