randRange( 2, 10 ) randRange( 1, N1 - 1 ) randFromArray(denominators)

fraction( N1, D ) - fraction( N2, D ) = {?}

( N1 - N2 ) / D
init({ range: [ [-3, 3], [-3, 3] ], scale: 25 }); PIECH = piechart([N1, D - N1], ["#e00", "#999"], 2);
init({ range: [ [-3, 3], [-3, 3] ], scale: 25 }); piechart([N1 - N2, N2, D - N1], ["#e00","#122", "#999"], 2);

Subtract the numerators.

init({ range: [ [-3, 3], [-3, 3] ], scale: 25 }); piechart([N1 - N2, D - N1 + N2], ["#e00", "#999"], 2);

fraction( N1, D ) - fraction( N2, D ) = fraction( N1 - N2, D )

Simplify.

init({ range: [ [-3, 3], [-3, 3] ], scale: 25 }); var frac = reduce(N1 - N2 , D); piechart([frac[0], frac[1] - frac[0]], ["#e00", "#999"], 2);

fraction( N1 - N2, D ) = fractionReduce( N1 - N2, D )