简短的回答
舍入将数字替换为选定精度的附近的、更简单的值。查看刚刚超过截止值的数字:5 或更高通常将最后保留的数字向上舍入,低于 5 则保持不变 - 尽管精确平局(尾随 5)的确切规则因方法而异。该计算器支持五种舍入模式:最近舍入、向上舍入、向下舍入、向零舍入和远离零舍入。
要点
- "Round to Nearest" here uses banker's rounding (round half to even), so 2.5 → 2 and 3.5 → 4, not always rounding .5 up.
- 无论数字的符号如何,向上舍入(上限)和向下舍入(下限)始终分别朝正无穷大或负无穷大移动。
- "Toward zero" and "away from zero" match floor/ceiling for positive numbers but flip for negative numbers — this is where the five modes genuinely diverge.
- 有效数字从第一个非零数字开始计算有意义的数字,这与计算小数位数不同。
五种舍入模式比较
| 模式 | 2.5 → | −2.5 → |
|---|---|---|
| 最近的(银行家) | 2 | −2 |
| 向上(天花板) | 3 | −2 |
| 下(地板) | 2 | −3 |
| 走向零 | 2 | −2 |
| 远离零 | 3 | −3 |
小数位与有效数字
小数位数计算小数点后的位数,句号。有效数字从第一个非零数字开始计算有意义的数字,无论它落在哪里。对于 0.004567:四舍五入到 3 个小数位得到 0.005,但四舍五入到 3 个有效数字得到 0.00457 — 一个更精确的结果,因为有效数字完全忽略前导零。
工作示例:相同的数字,五种方式
The table above shows exactly why the choice of mode matters: 2.5 and −2.5 are the same distance from zero, yet each rounding mode can send them to different results depending on the number's sign. "Round to Nearest" and "Toward zero" happen to agree here, but that won't always be the case for other numbers.
要避免的常见错误
- Assuming "round to nearest" always rounds a trailing 5 up — this tool, like Python and many technical systems, rounds half to even instead.
- Confusing "toward zero" and "away from zero" with floor and ceiling — they're identical for positive numbers but flip for negative numbers.
- Mixing up decimal places and significant figures — a small number like 0.004567 loses most of its precision if rounded to "3 decimal places" instead of "3 significant figures."
- 在多步计算的每个中间步骤进行舍入,而不是仅在最后进行舍入,这会导致小误差。