randRange(0, 9, 4) shuffle(NUMS) shuffle(NUMS) "" "" 1000 * DIGITS1[0] + DIGITS1[1] * 100 + DIGITS1[2] * 10 + DIGITS1[3] 1000 * DIGITS2[0] + DIGITS2[1] * 100 + DIGITS2[2] * 10 + DIGITS2[3] D1 / 1000 D2 / 1000 (function() { if (N1 === N2) { return "="; } else { return N1 < N2 ? "<" : ">"; } })() (function() { var places = []; for (var i = 0; i < DIGITS1.length; i++) { places.push(i); if (DIGITS1[i] !== DIGITS2[i]) { return places; } } return []; })()

Fill in the blank.

\large{N1} ____ \large{N2}

SOLUTION

  • <
  • >
  • =
[randRange(0, 9), randRange(0, 9)] (function() { var arr = shuffle(NUMS); arr.splice(rand(2), 0, 0); arr.push(0); return arr; })() (function() { var arr = shuffle(NUMS); arr.splice(rand(2), 0, 0); arr.push(0); return arr; })() DIGITS1[3] === 0 && rand(2) ? "0" : "" DIGITS1[3] === 0 && rand(2) ? "0" : "" 1000 * DIGITS1[0] + DIGITS1[1] * 100 + DIGITS1[2] * 10 + DIGITS1[3] 1000 * DIGITS2[0] + DIGITS2[1] * 100 + DIGITS2[2] * 10 + DIGITS2[3]
D1 / 1000 D2 / 1000 (function() { if (N1 === N2) { return "="; } else { return N1 < N2 ? "<" : ">"; } })() (function() { var places = []; for (var i = 0; i < DIGITS1.length; i++) { places.push(i); if (DIGITS1[i] !== DIGITS2[i]) { return places; } } return places; })()

Fill in the blank.

\large{N1TRAILING1} ____ \large{N2TRAILING2}

SOLUTION

  • <
  • >
  • =
\large{<} means "less than".
\large{>} means "greater than".

N1TRAILING1 = DIGITS1[0] + \dfrac{DIGITS1[1]}{10} + \dfrac{DIGITS1[2]}{100} + \dfrac{DIGITS1[3]}{1000}

\phantom{N1TRAILING1} = \dfrac{1000 * DIGITS1[0]}{1000} + \dfrac{100 * DIGITS1[1]}{1000} + \dfrac{10 * DIGITS1[2]}{1000} + \dfrac{DIGITS1[3]}{1000}

\phantom{N1TRAILING1} = \dfrac{1000 * DIGITS1[0] + 100 * DIGITS1[1] + 10 * DIGITS1[2] + DIGITS1[3]}{1000}

\phantom{N1TRAILING1} = \dfrac{D1}{1000}

N2TRAILING2 = DIGITS2[0] + \dfrac{DIGITS2[1]}{10} + \dfrac{DIGITS2[2]}{100} + \dfrac{DIGITS2[3]}{1000}

\phantom{N2TRAILING2} = \dfrac{1000 * DIGITS2[0]}{1000} + \dfrac{100 * DIGITS2[1]}{1000} + \dfrac{10 * DIGITS2[2]}{1000} + \dfrac{DIGITS2[3]}{1000}

\phantom{N2TRAILING2} = \dfrac{1000 * DIGITS2[0] + 100 * DIGITS2[1] + 10 * DIGITS2[2] + DIGITS2[3]}{1000}

\phantom{N2TRAILING2} = \dfrac{D2}{1000}

D1 thousandths is more than D2 thousandths.

D1 thousandths is less than D2 thousandths.

D1 thousandths is equal to D2 thousandths.

We can also line up the decimal points and compare the digits.

init({ range: [[-5, 5], [-1, 2]], scale: 25 }); for (var i = 0; i < DIGITS1.length; i++) { label([i, 1.5], "\\huge{" + DIGITS1[i] + "}"); label([i, 0], "\\huge{" + DIGITS2[i] + "}"); } label([0.5, 0], "\\huge{.}"); label([0.5, 1.5], "\\huge{.}");

Both numbers have the same digit in the plural_form(decimalPlaceNames[i], 2) place, so we have to check the next digit.

Both numbers have the same digit in the final place, so the two numbers are the same.

In the plural_form(decimalPlaceNames[i], 2) place, N1 has a higher value digit than N2.

In the plural_form(decimalPlaceNames[i], 2) place, N2 has a higher value digit than N1.

label([i, 1.5], "\\huge{\\blue{" + DIGITS1[i] + "}}"); label([i, 0], "\\huge{\\blue{" + DIGITS2[i] + "}}"); if (i !== 0) { label([i - 1, 1.5], "\\huge{" + DIGITS1[i - 1] + "}"); label([i - 1, 0], "\\huge{" + DIGITS2[i - 1] + "}"); }

Therefore \large{N1 > N2}.

Therefore \large{N1 < N2}.

Therefore \large{N1 = N2}.