Next: Approximate Numerical Methods Up: Approximate Numerical Methods for Previous: Approximate Numerical Methods for

## Forms of Numbers and Numerical Errors

1. Fixed-Point Numbers are represented by a fixed number of decimal places. Examples are

which are all expressed correct to 3 decimal places.

2. Floating-Point Numbers have a fixed number of significant places. Examples are

which are all given as four significant figures. The position of the decimal point is determined by the powers of .

3. Significant Digit This is any given digit, except possibly for 0 to the left of the first non-zero digit that fixes the position of the decimal point. The following numbers all have 4 significant figures.

In the last number the first three zeros simply fix the decimal point. Computers can only store a fixed nuber of significant figures, normally in the range 8 to 16 significant figures, so that numbers are NOT stored exactly. In decimal form

is truncated after a certain number of significant figures. This truncation process is called rounding.

4. Rounding To round to decimal places (or significant figures) means that we must discard the plus decimals. The rules for rounding are
• Rule (a) If the discarded number is less than , so that the first discarded digit is less than 5, leave the decimal unchanged. This is rounding down.

• Rule (b) If the discarded number is greater than , so that the first discarded digit is greater than 5 add one to the decimal. This is rounding up.

• Rule (c) If the discarded number is exactly then round to the nearest even decimal.

Example 1. .3

1. Round to 3, 2 and 1 decimals.

2. Round to 3, 2 and 1 decimals.

Errors due to rounding are called rounding errors.

5. Algorithm Stability An algorithm is a set of rules, describing the numerical method. This set of rules must include a stopping criterion. The algorithm is stable if small changes in the initial data only generates small changes in the final result. If the final result exhibits large changes, then the algorithm is unstable.

6. Truncation Errors These errors occur, for example, from stopping a Taylor series after only a few terms.

can be truncated and only the first few terms used, so that

In this case the truncation error is the error term.

7. Absolute Error To measure the importance of the error we introduce two different measures for the error. Firstly, the absolute error is defined in the following way. If is the exact value of a quantity and is the approximation, then the absolute error, , is
 (1.6)

8. Relative Error The second measure of the error is the relative error is defined by
 (1.7)

Next: Approximate Numerical Methods Up: Approximate Numerical Methods for Previous: Approximate Numerical Methods for
Prof. Alan Hood
2000-02-01