Comprehensive Calculator Guide
This calculator gives the floor ⌊x⌋, the largest integer not above x, and the ceiling ⌈x⌉, the smallest integer not below it, with rounding, truncation and the fractional part. ⌊3.7⌋ = 3, ⌈3.7⌉ = 4, and ⌊−3.7⌋ = −4.
Floor and ceiling
The floor always goes down the number line, the ceiling up. Truncation goes toward zero, so it differs from the floor for negatives. 45 students in buses of 20 need ⌈45/20⌉ = 3 buses.
How to Use
- Enter the number.
- Negatives are fine.
- Press “Calculate” to see the floor, ceiling, rounding, truncation and fractional part.
Formula Used
⌊x⌋ = largest integer ≤ x | ⌈x⌉ = smallest integer ≥ x
Practical Examples
- Example 1
- 3.7: 3 and 4.
- Example 2
- −3.7: −4 and −3.
- Example 3
- 5: all 5.
Important Tips
- Draw the number line for negatives.
- Ceiling for how many you need, floor for how many fit.
- Code floor and trunc differ for negatives.
Common Mistakes to Avoid
- ⌊−3.7⌋ = −3.
- Confusing ceiling with rounding.
- Forgetting integers are their own floor.
Frequently Asked Questions
- ⌊2.9⌋?
- 2.
- ⌈−2.1⌉?
- −2.
- Floor vs rounding?
- Floor always goes down.