# Khan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

47 lines (42 sloc) 2.17 kb
 Converting repeating decimals to fractions 1
randRange( 0, 3 ) randRange( 1, 8 ) N1 + N2 / 9 0 1 round( pow( 10, D2 ) ) round( pow( 10, D1 ) ) floorTo( 4,( MULT1 * N4 ) ) floorTo( 4,( MULT2 * N4 ) ) round( RES1 - RES2 )

Rewrite as a simplified fraction.

\large{N1.\overline{N2} = {?}}

N4

Let x equal the decimal. Set up two equations such that the digits after the decimal point are identical.

\large{\begin{align*}MULT1x &= RES1...\\ MULT2x &= RES2...\end{align*}}

Subtracting the two equations, we have:

\large{(MULT1 - MULT2)x = DIFF}

\large{x = fraction( DIFF, MULT1 - MULT2 )}\quad \text{or} \quad\large{mixedFractionFromImproper( DIFF, MULT1 - MULT2 )}

\large{x = fraction( toFraction( N4 )[ 0 ], toFraction( N4 )[ 1 ])}\quad \text{or} \quad\large{mixedFractionFromImproper( toFraction( N4 )[ 0 ], toFraction( N4 )[ 1 ] )}

Something went wrong with that request. Please try again.