rand(5) > 0 ? randRange( 1, 9 ) : 0 rand(3) > 0 ? "." + randRange(1, 9) : "" randFromArray(["", "-"])

Ile to jest \lvert SIGN + INT + FRAC \rvert?

INT + FRAC
init({ range: [ [-1, 11], [-1, 1] ] }); var start = 0; var end = 10; var originX = 0; var x = abs( INT ) + FRAC; if ( SIGN === "-" ) { start = -10; end = 0; originX = 10; x = 10 - x; } numberLine( start, end ); style({ stroke: "#6495ED", fill: "#6495ED" }); graph.pt = circle( [ x, 0 ], 0.15 ); style({ stroke: "#FFA500", fill: "#FFA500", strokeWidth: 3.5, arrows: "->" }); path( [ [ originX, 0 ], [ x, 0 ] ] ); circle( [ originX, 0 ], 0.10 ); graph.pt.toFront();

Odległość od 0 do SIGN + INT + FRAC wynosi INT + FRAC, jest to wartość bezwzględna.

Innymi słowy liczba INT + FRAC to po prostu liczba SIGN + INT + FRAC pozbawiona znaku ujemności.