12.07.2015 Views

Lecture Notes Course ÅMA 190 Numerical Mathematics, First ...

Lecture Notes Course ÅMA 190 Numerical Mathematics, First ...

Lecture Notes Course ÅMA 190 Numerical Mathematics, First ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 2On the representation ofnumbers in a computer2.1 IntroductionComputers may be used to process numbers in two different ways, namely asexact quantities which are processed by means of symbolic manipulations or asdata which are subject to numerical evaluation, often involving approximation.Software packages called computer algebras perform symbolic manipulations.Examples of such packets are: Maple, Mathematica, Derive and Macsyma.There is a principal limit to the performance of these processors, since onlya finite number of symbols may be stored in a given computer while it is possibleto devise mathematical expressions of any length, e.g.s =∞∑ln(cos 2 ( n√ n)) · e −n .n=1If we accept approximate values, then our calculations may be carried out bymeans of an algorithmic language like Matlab, Fortran77, Fortran90 or C. Bywriting a short program in any of these languages it would be easy to determinethe sum above to any desired accuracy, say 8 decimal places, by directsummation.2.2 Implementation of expressions on a computerSince a computer only may carry out a finite number of arithmetic operationsand a finite number of logical choices the most general expression which may beevaluated by means of a computer is a piecewise rational function. The value ofsuch an expression is affected by round-off errors, which may accumulate. Thisalso means that e.g. all standard functions must be approximated by piecewiserational functions. We now introduce22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!