Using the Debugger É 225
8.2 Types of Errors
The three major types of bugs are typographic errors (typos), syntax errors, and algorithmic
errors. They are described as follows:
1. A typographic error is a simple typing error. For example, suppose you wanted to write
y = sin(x) but instead you wrote y = sim(x), then you will not obtain the correct result. If
the error occurs while you are typing a function name, it can be easier to fi nd. But if you
mistype a variable name, it can lead to unexpected results that can be extremely diffi cult to
track down and eliminate. For example, if you type x = cos(y); when you intended to type
x = cos(t); and t is a vector of different size than y, you will likely receive an error message
about the size of ...