\Large fracParens( BASE_N, BASE_D )^{EXP_SIGN+EXP}
SOL_N / SOL_D
Any time we have a negative exponent, we can change it to a positive exponent if we flip the numerator and denominator: [Why is that?]
The exponent tells us how many times to multiply by the base. If the exponent is negative, then it tells us how many times to divide by the base.
fracParens( BASE_N, BASE_D )^{\color{BLUE}{EXP_SIGN+EXP}} \quad = \quad \color{gray}{1}
\color{BLUE}{\div} fraction( BASE_N, BASE_D, false, true )\enspace
Since dividing by a fraction is the same as multiplying by its reciprocal, we can replace the division with multiplication:
\hphantom{fracParens( BASE_N, BASE_D )^{EXP_SIGN+EXP}} \quad = \quad \color{gray}{1}
\color{GREEN}{\times} fraction( BASE_D, BASE_N, false, true )\enspace
\quad = \quad fraction( BASE_D, BASE_N, false, true, false, true )^{\color{GREEN}{EXP}}
For more, check out the negative exponent intuition video.
fracParens( BASE_N, BASE_D )^{EXP_SIGN+EXP} \quad = \quad fracParens( BASEF_N, BASEF_D )^{EXP}
To find fracParens( BASEF_N, BASEF_D )^{\color{BLUE}{EXP}},
multiply cardinalThrough20( EXP ) round( BASEF_N/BASEF_D )s together.
\quad = \quad v
Any number to the first power is simply that number.
Taking an exponent of a fraction is the same as taking the same exponent of the numerator and denominator: [Why is that?]
The exponent tells us how many times we're multiplying the fraction by itself. So in this case, we're
multiplying fraction( BASEF_N, BASEF_D, false, true, true ) by itself
cardinalThrough20( EXP ) times:
fracParens( BASEF_N, BASEF_D )^{\color{BLUE}{EXP}} \quad = \quad
fraction( BASEF_N, BASEF_D, false, true )
\times fraction( BASEF_N, BASEF_D, false, true )\enspace
When we multiply fractions, we just multiply the numerators and denominators separately:
\hphantom{fracParens( BASEF_N, BASEF_D )^{EXP}} \quad = \quad
\dfrac{jQuery.map( Array(EXP), function() { return reduce( BASEF_N, BASEF_D )[0] }).join("\\times ")}
{jQuery.map( Array(EXP), function() { return reduce( BASEF_N, BASEF_D )[1] }).join("\\times ")}
If we rewrite the numerator and denominator as exponents, we end up with the original fraction with the numerator and denominator each raised to the original exponent:
\hphantom{fracParens( BASEF_N, BASEF_D )^{EXP}} \quad = \quad
\dfrac{reduce( BASEF_N, BASEF_D )[0]^{\color{BLUE}{EXP}}}
{reduce( BASEF_N, BASEF_D )[1]^{\color{BLUE}{EXP}}}
\qquad fracParens( BASEF_N, BASEF_D )^{EXP} \quad = \quad
\dfrac{BASEFS_N^{EXP}}{BASEFS_D^{EXP}}
Expand the exponents in the numerator and denominator into multiplication problems:
\hphantom{\qquad fracParens( BASEF_N, BASEF_D )^{EXP} \quad} = \quad
\dfrac{jQuery.map( Array( EXP ), function() { return BASEFS_N; }).join("\\times ")}
{jQuery.map( Array( EXP ), function() { return BASEFS_D; }).join("\\times ")}
Multiply everything together:
\hphantom{\qquad fracParens( BASEF_N, BASEF_D )^{EXP} \quad} = \quad
\dfrac{
pow( BASEFS_N, I + 1 )
jQuery.map( Array( EXP - I - 1 ), function() { return "\\times " + BASEFS_N; }).join("")
}{
pow( BASEFS_D, I + 1 )
jQuery.map( Array( EXP - I - 1 ), function() { return "\\times " + BASEFS_D; }).join("")
}
Any number to the first power is simply that number.
The final answer is: \quadfractionReduce( SOL_N, SOL_D )