In floating point arithmetic, $0.1 + 0.2$ evaluates to $0.30000000000000004$ due to rounding errors.
Terms
| Term | This example | Why |
|---|---|---|
| error | ✓ | The extra $0.00000000000000004$ is an error: the rounding error of floating-point arithmetic. |
| exception | ✗ | The rounding in $0.1 + 0.2$ is not an exception, because nothing is raised. |
| bug | ✗ | The rounding in $0.1 + 0.2$ is not a bug unless the code assumes that the result is exactly $0.3$. |