logic errors

Code that misbehaves

Logic errors are mistakes in a program's reasoning that cause incorrect results even though the code runs without crashing.

Unlike syntax errors, which prevent execution, logic errors produce the wrong output: a calculation that's always off by one, a loop that runs forever, or a condition that triggers when it shouldn't.

The code compiled fine but gave wrong answers—must be a logic error.

These are often the hardest bugs to find because the computer does exactly what you told it to, not what you meant.

reasoning

fallacy

Error in reasoning

false dilemma · hasty generalization · slippery slope · begging the question · equivocation · straw man · red herring · ad hominem · false cause · oversimplification

programming

bug

Crawling creature or defect

infinite loop · stack overflow · race condition · memory leak · edge case · breakpoint · stack trace · code review · refactor · unit test

Categories
Opposites
error type in programming

logic errorssyntax errors

Invalid code structure

crashes · typos · memory leaks

correctness

logic errorsclean code

Well-organized, maintainable programming

Family

logic, errors, logical, logically, illogical, logician, logistics, logistic, logistical

Familiarity
Top 500,000
Profile
Used worldwide · Timeless · Rated G