randRangeWeighted(0, 9, 0, 0.5) randRange(1, 9) randRange(1, 9) (function() { var digits = [A, B, C, 0]; var array = []; var used = {}; while (array.length < 5) { var digitForNumber = digitsToInteger(shuffle(digits)); var decimalPlaces = randRange(2, 4); var decimal = roundTo(decimalPlaces, digitForNumber / 10000); var tenthousandths = round(decimal * 10000); if (tenthousandths !== 0 && !used[tenthousandths]) { used[tenthousandths] = true; array.push([decimal, round(decimal * pow(10, decimalPlaces)), decimalPlaces, localeToFixed(decimal, decimalPlaces)]); } } return array; })() (function() { var p = 1; for (var i=0; i < NUMS.length; i++) { if (NUMS[i][2] > p) { p = NUMS[i][2]; } } return p; })() pow(10, MAX_P) $.extend(true, [], NUMS).sort(function(a, b) { return a[0] - b[0]; }) $.map(NUMS_SORT, function(el) { return round(el[0] * P, 4); }).join( ",\\ " ) $.map(NUMS_SORT, function(el) { return el[3]; }).join( ",\\ " ) createSorter()

Order the following numbers from least to greatest:

  • NUM[3] NUM[3]

SORTER.init("sortable")

SORTER.getContent()
return guess.join( ",\\ " ) === DECIMAL_SORT_TEX;
SORTER.setContent( guess );

\qquad \begin{align*} NUM[3] &= NUM[1] \text{ plural_form(decimalPlaceNames[NUM[2]], NUM[1])} \\ \end{align*}

Get each number in plural_form(decimalPlaceNames[MAX_P], 2).

\qquad \begin{align*} NUM[3] &= round(NUM[0] * P)\text{ plural_form(decimalPlaceNames[MAX_P], 2)} \\ \end{align*}

Order the numbers: NUMS_SORT_TEX.

Convert back to decimals.

DECIMAL_SORT_TEX.