Mueve el punto anaranjado a SOLUTION en la recta numérica.
init({range:[[LOWER_BOUND-.3,UPPER_BOUND+.3],[-1,1]],scale:[108,40]}),style({arrows:">"}),line([0,0],[UPPER_BOUND+.25,0]),style({arrows:"->"}),line([0,0],[LOWER_BOUND-.25,0]),style({arrows:""});for(var x=LOWER_BOUND;UPPER_BOUND>=x;x+=.5){var markLength=x%1===0?.2:.1;line([x,-markLength],[x,markLength])}style({stroke:BLUE,strokeWidth:3.5}),line([LOWER_BOUND,-.2],[LOWER_BOUND,.2]),label([LOWER_BOUND,-.53],LOWER_BOUND,"center",{color:BLUE}),line([UPPER_BOUND,-.2],[UPPER_BOUND,.2]),label([UPPER_BOUND,-.53],UPPER_BOUND,"center",{color:BLUE}),line([0,-.2],[0,.2]),label([0,-.53],"0","center",{color:BLUE}),addMouseLayer(),graph.movablePoint=addMovablePoint({constraints:{constrainY:!0},snapX:.1}),graph.movablePoint.onMove=function(r,a){return[min(max(LOWER_BOUND,r),UPPER_BOUND),a]}
Como SOLUTION es positivo, el punto anaranjado estará a la derecha de 0.
Como SOLUTION es negativo, el punto anaranjado estará a la izquierda de 0.
Separa el decimal del número entero:
SOLUTION = \purple{SOLUTION_WHOLE} + \purple{SOLUTION_DECIMAL}
Therefore, we know SOLUTION lies between
\green{SOLUTION_WHOLE} and
\green{SOLUTION_WHOLE + (SOLUTION > 0 ? 1 : -1)} on the number line.
var x=SOLUTION>0?SOLUTION_WHOLE:SOLUTION_WHOLE-1;rect(x,-.3,1,.6,{fill:GREEN,fillOpacity:.5,stroke:"none"})
style({stroke:BLUE,fill:"#6495ED",strokeWidth:3.5,arrows:"->"}),line([0,0],[SOLUTION,0]),graph.movablePoint.visibleShape.toFront()
El punto anaranjado debe cambiarse a la posición SOLUTION a la derecha de 0.
label([SOLUTION,.53],SOLUTION,"center",{color:PINK}),graph.movablePoint.moveTo(SOLUTION,0)
El número resaltado muestra donde está \pink{SOLUTION} la recta numérica.