Rewrite fraction(I_NUM, I_DENOM, false, true)
as a mixed number.
I_NUM / I_DENOM
\blue{fraction(I_NUM, I_DENOM, false, true)}
is the same as the fraction FRACTION
added I_NUM
times.
We can add I_DENOM
of the FRACTION
fractions together to get 1
whole.
\qquad_(I_DENOM).times(function() { return FRACTION; }).join("+")
= \green{WHOLE_FRAC}
So we can write \blue{fraction(I_NUM, I_DENOM, false, true)}
like this:
\blue{fraction(I_NUM, I_DENOM, false, true)} =
_(WHOLE).times(function() { return "\\green{" + WHOLE_FRAC + "}"; }).join("+")
+ \pink{\dfrac{M_REDUCED_NUM}{I_DENOM}}
\green{WHOLE_FRAC} = \green{1\text{ WHOLE_TEXT}}
,
so we can rewrite our equation like this:
\blue{fraction(I_NUM, I_DENOM, false, true)} =
_(WHOLE).times(function() { return "\\green{1}"; }).join("+")
+ \pink{\dfrac{M_REDUCED_NUM}{I_DENOM}}
\blue{fraction(I_NUM, I_DENOM, false, true)} =
\green{WHOLE} + \pink{\dfrac{M_REDUCED_NUM}{I_DENOM}}
The mixed number is WHOLE\dfrac{M_REDUCED_NUM}{I_DENOM}
Rewrite WHOLEfraction(M_NUM, M_DENOM, false, true)
as a fraction,
\dfrac{a}{b}
, where a > b
.
I_NUM / I_DENOM
\blue{WHOLEfraction(M_NUM, M_DENOM, false, true)} =
\green{WHOLE} + \pink{fraction(M_NUM, M_DENOM, false, true)}
\blue{WHOLEfraction(M_NUM, M_DENOM, false, true)} =
_(WHOLE).times(function() { return "\\green{1}"; }).join("+")
+ \pink{fraction(M_NUM, M_DENOM, false, true)}
\green{1\text{ WHOLE_TEXT}} = \green{WHOLE_FRAC}
,
so we can rewrite our equation like this:
\blue{WHOLEfraction(M_NUM, M_DENOM, false, true)} =
_(WHOLE).times(function() { return "\\green{" + WHOLE_FRAC + "}"; }).join("+")
+ \pink{fraction(M_NUM, M_DENOM, false, true)}
Now we can add the fractions:
\blue{WHOLEfraction(M_NUM, M_DENOM, false, true)} =
\green{\dfrac{I_DENOM * WHOLE}{I_DENOM}} +
\pink{\dfrac{M_REDUCED_NUM}{I_DENOM}}
\blue{WHOLEfraction(M_NUM, M_DENOM, false, true)} =
fraction(I_NUM, I_DENOM, true, true)
The fraction is fraction(I_NUM, I_DENOM, true, true)
.