Discord

INAIO Guide Stage 1 1Numerical Foundations

1.5 Floor, ceiling and rounding

Distinguish nearest rounding from always rounding down or up, and control when approximations affect an answer.

Many questions start with a continuous quantity but require a whole-number answer: packets, moves, people, or completed rounds. Rounding also appears when a problem asks for a specified number of decimal places. Choosing the wrong operation, or rounding too early, can change an answer by one even when the arithmetic before it is correct.

This is foundational material. Khan Academy's decimal-rounding lesson is a good starting point. Math Is Fun's floor-and-ceiling explanation shows how the two functions behave, including for negative numbers. You need only signed numbers and division to follow this module.

A basic idea: three different answers

Consider 2.32.3. Rounding to the nearest integer gives 22. Its floor is also 22, because 22 is the greatest integer no larger than 2.32.3. Its ceiling is 33, the smallest integer no smaller than 2.32.3. These operations happen to agree sometimes, but they ask different questions.

For −1.2-1.2, the floor is −2-2 and the ceiling is −1-1. “Down” means left on the number line, not toward zero.

Two number lines. The input 2.3 lies between floor 2 and ceiling 3; the input minus 1.2 lies between floor minus 2 and ceiling minus 1. Arrows point left for floor and right for ceiling.Two number lines. The input 2.3 lies between floor 2 and ceiling 3; the input minus 1.2 lies between floor minus 2 and ceiling minus 1. Arrows point left for floor and right for ceiling.
Floor goes to the nearest integer on the left; ceiling goes to the nearest integer on the right.

A quick tour of rules

The definitions are

⌊x⌋=greatest integer at most x,⌈x⌉=smallest integer at least x.\lfloor x\rfloor=\text{greatest integer at most }x,\qquad \lceil x\rceil=\text{smallest integer at least }x.

If xx is an integer, ⌊x⌋=⌈x⌉=x\lfloor x\rfloor=\lceil x\rceil=x. Otherwise, ⌊x⌋<x<⌈x⌉\lfloor x\rfloor<x<\lceil x\rceil. Another useful check is

⌊x⌋≤x<⌊x⌋+1,⌈x⌉−1<x≤⌈x⌉.\lfloor x\rfloor\le x<\lfloor x\rfloor+1,\qquad \lceil x\rceil-1<x\le\lceil x\rceil.

Floor and ceiling are linked by ⌈x⌉=−⌊−x⌋\lceil x\rceil=-\lfloor -x\rfloor. For example, ⌈2.3⌉=−⌊−2.3⌋=−(−3)=3\lceil2.3\rceil=-\lfloor-2.3\rfloor=-(-3)=3.

Rounding to the nearest integer chooses the closer integer instead. If a number falls exactly halfway between two integers, the rule for breaking ties must be stated; different contexts use different conventions. To round to dd decimal places, look at the next digit. Under ordinary nearest rounding, the numerical error is at most 0.5×10−d0.5\times10^{-d}, including a possible halfway tie.

Keep exact fractions or enough decimal places until the final requested operation. In particular, ⌊x⌋\lfloor x\rfloor and ⌈x⌉\lceil x\rceil can change when a rounded approximation crosses an integer boundary.

Application 1: complete and partial packets

A device records 5353 samples. Each packet holds 88 samples. How many packets can be filled completely, and how many are needed to send all samples?

  1. Divide by the capacity. 53/8=6.62553/8=6.625 packets.
  2. Count complete packets with floor. ⌊6.625⌋=6\lfloor6.625\rfloor=6 packets hold 6⋅8=486\cdot8=48 samples.
  3. Count every packet needed with ceiling. Five samples remain, so one more packet is needed: ⌈6.625⌉=7\lceil6.625\rceil=7.

Nearest rounding would give 77, but it does not explain the two different questions. “Completely filled” asks for floor; “enough to hold everything” asks for ceiling.

Application 2: a probability near a cutoff

A calculation gives a probability of p=0.3799p=0.3799. The requested answer is ⌊100p⌋\lfloor100p\rfloor. What should you report?

  1. Keep the given precision. 100p=37.99100p=37.99.
  2. Apply floor at the end. The greatest integer no larger than 37.9937.99 is 3737.
  3. Check an early-rounding trap. Rounding pp to 0.380.38 first would give ⌊38⌋=38\lfloor38\rfloor=38, one too high.

The difference is small before the floor operation but decisive afterward. If an input is already an approximation, check whether its uncertainty is narrow enough to keep the same integer answer.

Resources

SourceTitleWhy read it
Khan AcademyRounding decimalsReview place value and rounding on a number line.
Math Is FunFloor and ceiling functionsSee definitions, negative-number examples, and step graphs.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments