randRange(3, 9) randRange(3, 12) * (rand(2) ? 1 : -1) randRange(3, 12) * (rand(2) ? 1 : -1)

Rewrite \large{expr(["*", ["^", BASE, EXP1], ["^", BASE, EXP2]])} in the form \large{BASE^n}.

BASE^EXP1 + EXP2

\large{ expr(["*", ["^", BASE, EXP1], ["^", BASE, EXP2]]) = expr(["^", BASE, ["+", EXP1, EXP2]])}

\large{\hphantom{ expr(["*", ["^", BASE, EXP1], ["^", BASE, EXP2]])} = BASE^{EXP1 + EXP2}}

randRange(3, 9) randRange(3, 12) * (rand(2) ? 1 : -1) randRange(3, 12) * (rand(2) ? 1 : -1)

Rewrite \large{expr(["frac", ["^", BASE, EXP1], ["^", BASE, EXP2]])} in the form \large{BASE^n}.

BASE^EXP1 - EXP2

\large{ expr(["frac", ["^", BASE, EXP1], ["^", BASE, EXP2]]) = expr(["^", BASE, ["-", EXP1, EXP2]])}

\large{ \hphantom{expr(["frac", ["^", BASE, EXP1], ["^", BASE, EXP2]])} = BASE^{EXP1 - EXP2}}

Rewrite \large{expr(["^", ["^", BASE, EXP1], EXP2])} in the form \large{BASE^n}.

BASE^EXP1 * EXP2

\large{ expr(["^", ["^", BASE, EXP1], EXP2]) = expr(["^", BASE, ["*", EXP1, EXP2]])}

\large{\hphantom{ expr(["^", ["^", BASE, EXP1], EXP2])} = BASE^{EXP1 * EXP2}}

randRange(3, 9) randRange(3, 9) randRange(3, 12) * (rand(2) ? 1 : -1) randRange(3, 12) * (rand(2) ? 1 : -1) randRange(3, 12) * (rand(2) ? 1 : -1)

Rewrite \large{expr(["^", ["*", ["^", BASE1, EXP1], ["^", BASE2, EXP2]], EXP3])} in the form \large{BASE1^n \times BASE2^m}.

BASE1^EXP1 * EXP3 * BASE2^EXP2 * EXP3

\large{ expr(["^", ["*", ["^", BASE1, EXP1], ["^", BASE2, EXP2]], EXP3]) = expr(["*", ["^", BASE1, ["*", EXP1, EXP3]], ["^", BASE2, ["*", EXP2, EXP3]]])}

\large{\hphantom{ expr(["^", ["*", ["^", BASE1, EXP1], ["^", BASE2, EXP2]], EXP3])} = expr(["^", BASE1, EXP1*EXP3]) \times expr(["^", BASE2, EXP2*EXP3])}