follow()
randRange( 0 , 15 ) randRange( 1 , 15 )
rand( 2 ) === 1 ? "-" : "" SIGN === "-" ? NOMINATOR/DENOMINATOR * -1 : NOMINATOR/DENOMINATOR SIGN + " \\dfrac{" + NOMINATOR + "}{" + DENOMINATOR + "}" SIGN + fraction( NOMINATOR, DENOMINATOR, true, true, false )

Place the black box on the position of NICE_NUMBER on the number line!

init({ scale: [ 80, 40 ], range: [ [-0.2, 8 ], [-1, 1] ] }); var start = -3; var end = 3; var originX = 0; var x = NUMBER; numberLine( start, end ); style({ stroke: "#6495ED", fill: "#6495ED" }); style({ stroke: "#FFA500", fill: "#FFA500", strokeWidth: 3.5, arrows: "->" }); var already = [];

NICE_NUMBER is equal to REDUCED_NUMBER

Because REDUCED_NUMBER is positivenegative we go rightleft from 0

REDUCED_NUMBER is fraction( parseInt( SIGN + ( NOMINATOR - ( DENOMINATOR * floor( abs( NUMBER) ) ) ) ) , DENOMINATOR, true, true ) away from floor( abs( NUMBER ) ) * NUMBER/abs( NUMBER )

Therefore REDUCED_NUMBER is between floor( NUMBER ) and ceil( NUMBER )

If we zoom in to that portion of the number line:
init({ scale: [ 640, 40 ], range: [ [-0.007, 1.1 ], [-1, 1] ] }); var start = floor( NUMBER ) - 0.001; var end = ceil( NUMBER ) + 0.001; var originX = 0; var x = NUMBER; numberLine( start, end, 1 / reduce( NOMINATOR, DENOMINATOR)[1], 0 ,0, reduce( NOMINATOR, DENOMINATOR )[1] ); style({ stroke: "#6495ED", fill: "#6495ED" }); style({ stroke: "#FFA500", fill: "#FFA500", strokeWidth: 3.5 }); var already = []; for( i = 0; i != WRONGS.length; i++ ){ if( WRONGS[ i ] >= start && WRONGS[ i ] <= end ){ ellipse( [ WRONGS[ i ] - start, 0 ], [ 0.01, 0.12 ] ); label( [WRONGS[ i ] - start, 0 ], POSS_ANSWER[ i ] , "above", { labelDistance: 5 } ); } }