Abstract
This chapter begins with basic information about how a digital computer represents and works with numbers. For floating point numbers, the chapter describes how rounding errors occur in arithmetic operations, and examines the consequences for basic computations such as subtraction, finite differences and quadratic equations. Problems such as overflow, underflow and floating point exceptions are examined. Next, programming languages are introduced, compared and applied to the development of scientific computing algorithms. Techniques for timing the execution of programs are described, for later use in comparing the relative efficiency of competing algorithms. Object-oriented programming is introduced in C++. The organization of computer memory and its relevance to the design of computer programs is examined and applied to matrix operations. The fundamentals of computer input and output are provided for various computer languages. Important programming suggestions and techniques of defensive programming to detect and protect against floating point exceptions and memory faults are provided. The fundamental algorithm libraries LAPACK, STL and Pthread are introduced.
To err is human, but to really foul things up requires a computer.
Farmers’ Almanac, 1978
“There are only 10 types of people in the world: those who understand binary, and those who don’t.” Wikipedia webpage on Mathematical Jokes
Part of the inhumanity of the computer is that, once it is competently programmed and working smoothly, it is completely honest.
Isaac Asimov
Additional Material: The details of the computer programs referred in the text are available in the Springer website (http://extras.springer.com/2018/978-3-319-69105-3) for authorized users.
This is a preview of subscription content, log in via an institution.
Notes
- 1.
Originally, a read from unit 5 referred to the card reader; a write to unit 6 referred to the paper printer, and a write to unit 7 referred to a separate card punch machine.
References
A.V. Aho, J.E. Hopcroft, J.D. Ullman, The Design and Analysis of Computer Algorithms (Addison-Wesley, Boston, 1974)
E. Anderson, Z. Bai, C. Bischof, J. Demmel, J. Dongarra, J. DuCroz, A. Greenbaum, S. Hammarling, A. McKenney, S. Ostrouchov, D. Sorensen (eds.), LAPACK Users’ Guide (SIAM, Philadelphia, 1992)
J.J. Barton, L.R. Nackman, Scientific and Engineering C++ (Addison-Wesley, Reading, 1994)
S. Chapman, Fortran 95/2003 for Scientists and Engineers (McGraw-Hill, New York, 2007)
J.J. Dongarra, J.R. Bunch, C.B. Moler, G.W. Stewart, Linpack Users’ Guide (SIAM, Philadelphia, 1979)
D. Flanagan, JavaScript: The Definitive Guide (O’Reilly, Sebastopol, 2011)
N.J. Higham, Accuracy and Stability of Numerical Algorithms (SIAM Publications, Philadelphia, 2002)
N.M. Josuttis, The C++ Standard Library: A Tutorial and Reference (Addison-Wesley, Boston, 2000)
B.W. Kernighan, D.M. Ritchie, C Programming Language (Prentice-Hall, Englewood Cliffs, 1988)
D.E. Knuth, The Art of Computer Programming, 1: Fundamental Algorithms (Addison-Wesley, Reading, 1997)
M. Lutz, Learning Python: Power Object-Oriented Programming (O’Reilly Media, Sebastopol, 2013)
D. Musser, STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (Addison Wesley, Reading, 2001)
D.A. Patterson, J.L. Hennessy, Computer Organization and Design: The Hardware/Software Interface (Morgan Kaufmann, San Francisco, 1994)
B. Stroustrup, The C++ Programming Language, 3rd edn. (Addison-Wesley, Boston, 1997)
R.A. van de Geijn, E.S. Quintana-Ortí, The Science of Programming Matrix Computations (Lulu, Morrisville, 2008)
D. Vandevoorde, N.M. Josuttis, C++ Templates: The Complete Guide (Addison-Wesley, Boston, 2002)
R.C. Whaley, A. Petitet, Minimizing development and maintenance costs in supporting persistently optimized BLAS. Softw. Pract. Exp. 35(2), 101–121 (2005)
J.H. Wilkinson, Rounding Errors in Algebraic Processes (Prentice-Hall, Englewood Cliffs, NJ, 1963)
J.H. Wilkinson, C. Reinsch, Handbook for Automatic Computation Volume II Linear Algebra, vol. 186. Die Grundlehren der Mathematischen Wissenschaften in Einzeldarstellungen (Springer, Berlin, 1971)
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG, part of Springer Nature
About this chapter
Cite this chapter
Trangenstein, J.A. (2017). Working with a Computer. In: Scientific Computing. Texts in Computational Science and Engineering, vol 18. Springer, Cham. https://doi.org/10.1007/978-3-319-69105-3_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-69105-3_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-69104-6
Online ISBN: 978-3-319-69105-3
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)