Parenthesizing log raised to a power during AST to plain text conversion