Bug
Elementary
A bug is a mistake in a program that makes it behave incorrectly.
Examples
Non-examplesThings that may be mistaken for examples of this term.
-
✗ In floating point arithmetic, $0.1 + 0.2$ evaluates to $0.30000000000000004$ due to rounding errors. High schoolThe rounding in $0.1 + 0.2$ is not a bug unless the code assumes that the result is exactly $0.3$.
-
The
FileNotFoundErroris not a bug, because a missing file is an expected condition, not a mistake in the code.
All definitions · All distinctions · All examples · Notation