Permalink
Browse files

Issue #5950: Improve hints for simplifying fractions

  • Loading branch information...
1 parent 870e511 commit d8a4f39094a305267c578df0cb8202b97d5d8aae @kd5bjo kd5bjo committed with marcia Nov 10, 2011
Showing with 13 additions and 7 deletions.
  1. +13 −7 exercises/simplifying_fractions.html
@@ -42,24 +42,30 @@
<div class="hints">
<p data-if="GCD_FACTORS.length !== 1">There are several ways to tackle this problem.</p>
- <p>What is the GCD of <var>NUM</var> and <var>DENOM</var>?</p>
+ <p>What is the greatest common factor (GCD) of <var>NUM</var> and <var>DENOM</var>?</p>
- <p>GCD(<var>NUM</var>, <var>DENOM</var>) = <var>GCD</var></p>
+ <p><code><var>NUM</var> = <var>getPrimeFactorization( NUM ).join( "\\cdot" )</var></code><br />
+ <code><var>DENOM</var> = <var>getPrimeFactorization( DENOM ).join( "\\cdot" )</var></code></p>
+
+ <p><code>\mbox{GCD}(<var>NUM</var>, <var>DENOM</var>) = <var>GCD_FACTORS.join( "\\cdot" )</var> = <var>GCD</var></code></p>
<p>
- <code>\dfrac{<var>NUM</var>}{<var>DENOM</var>}</code>
+ <code>\dfrac{<var>NUM</var>}{<var>DENOM</var>}
+ = \dfrac{<var>NUM / GCD</var> \cdot <var>GCD</var>}{ <var>DENOM / GCD</var>\cdot <var>GCD</var>}</code>
</p>
<p>
- <code>= \dfrac{<var>NUM / GCD</var> \cdot <var>GCD</var>}{ <var>DENOM / GCD</var>\cdot <var>GCD</var>}</code>
+ <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
+ = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>} \cdot \dfrac{<var>GCD</var>}{<var>GCD</var>}</code>
</p>
<p>
- <code>= \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>} \cdot \dfrac{<var>GCD</var>}{<var>GCD</var>}</code>
+ <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
+ = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>} \cdot 1</code>
</p>
-
<p>
- <code>= \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>}</code>
+ <code>\hphantom{\dfrac{<var>NUM</var>}{<var>DENOM</var>}}
+ = \dfrac{<var>NUM / GCD</var>}{<var>DENOM / GCD</var>}</code>
</p>
<div data-if="GCD_FACTORS.length !== 1" data-unwrap>
<p>You can also solve this problem by repeatedly breaking the numerator and denominator into common factors.</p>

0 comments on commit d8a4f39

Please sign in to comment.