010Mathematics · Approximation and bounds

Maximum integer under a strict bound

Maximum integer under a strict bound

Maximum integer under a strict bound · n

  • 21 bytes
  • COMP mode
01

Worked examples

Example 1

A rope's length is recorded as 8.2 m, correct to the nearest 0.1 m. It is cut into decorative pieces, each exactly 0.3 m long, with no waste. What is the greatest possible number of complete pieces?

  1. A.26
  2. B.27
  3. C.28
  4. D.29
Answer
B — 27 pieces.
Standard solution (without a calculator)
  1. Bounds of the length: correct to the nearest 0.1 m, the actual length L satisfies 8.15 ≤ L < 8.25 m; L never reaches 8.25 m.
  2. Inequality: n complete pieces need 0.3n ≤ L < 8.25, so 0.3n < 8.25 and n < 8.25 ÷ 0.3 = 27.5.
  3. Greatest integer: 27.5 is not a whole number, so n = 27. Check: 0.3 × 27 = 8.1 m, which even the shortest possible rope can supply, while 0.3 × 28 = 8.4 m ≥ 8.25 m.
  4. Conclusion: at most 27 complete pieces; the answer is B.
Do it on the calculator

Example 2

A bag of rice has a mass recorded as 2.3 kg, correct to the nearest 0.1 kg. It is packed into small packets of exactly 0.05 kg each, with no loss. What is the greatest possible number of complete packets?

  1. A.45
  2. B.47
  3. C.48
  4. D.46
Answer
D — 46 packets.
Standard solution (without a calculator)
  1. Bounds of the mass: the actual mass W satisfies 2.25 ≤ W < 2.35 kg.
  2. Inequality: n packets need 0.05n ≤ W < 2.35, so n < 2.35 ÷ 0.05 = 47.
  3. Strict bound: 47 is a whole number, but n = 47 would need W = 2.35 kg, which is excluded. So n = 47 − 1 = 46.
  4. Check and conclude: 0.05 × 46 = 2.3 kg is possible when 2.3 ≤ W < 2.35. The greatest number is 46; the answer is D, not the trap option B (47).
Do it on the calculator

Example 3

A small pump has V litres of fuel left, where 0 ≤ V < 0.35. Each complete test uses exactly 0.4 litres and no fuel can be added. What is the greatest possible number of complete tests?

  1. A.0
  2. B.1
  3. C.2
  4. D.3
Answer
A — 0 tests.
Standard solution (without a calculator)
  1. Model: n complete tests need 0.4n ≤ V < 0.35 litres.
  2. Inequality: 0.4n < 0.35, so n < 0.35 ÷ 0.4 = 0.875.
  3. Greatest integer: the greatest integer less than 0.875 is 0. Even one test needs 0.4 litres, more than the fuel can ever be.
  4. Conclusion: no complete test is possible; the answer is A.
Do it on the calculator
02

When to use it

A total recorded correct to a given accuracy lies below an upper bound U that is never reached. Sharing it into pieces of m each gives mn < U, so n < t = U ÷ m. The greatest such integer is t − 1 when t is a whole number, and the integer part of t otherwise.

Enter the quotient

  • A: t = U ÷ m, the excluded upper bound of the total divided by the smallest possible amount per piece. Use the same unit for U and m, and t > 0.
  • Type the division itself, such as 8.25÷0.3, at the A? prompt. Do not round the quotient first.

Read the result

  • The only screen is n, the greatest integer strictly less than t. There is no error marker, so check the input yourself.

Question types

  • Original practice for HKDSE Mathematics Compulsory Part, estimation and errors in measurement: the greatest number of pieces, packets or tests that a quantity given to a stated accuracy can supply.

Before you start

  • Run in COMP from an empty program area (P3 in these examples) with at least 21 bytes free. A is overwritten.
  • Valid range: 0 < t ≤ 10¹⁰, with U > 0 and m > 0. The program has no input check, and a zero or negative t gives no meaningful count.
  • The program solves the strict inequality n < t. If the bound can be reached (n ≤ t), the answer is the integer part of t instead; do not use this program directly.
  • Use the excluded upper bound of the total and the smallest possible amount per piece. Add any waste, fixed group sizes or other conditions to the model first.
  • The calculator cannot reliably separate a quotient that differs from a whole number only in the 13th–15th significant figure. Settle such data with exact fractions.
  • The program leaves the display in Fix 0. Change back to Norm 1 before ordinary decimal calculations.

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.