Skip to main content

Working with a Computer

  • Chapter
  • First Online:
  • 2391 Accesses

Part of the book series: Texts in Computational Science and Engineering ((TCSE,volume 18))

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. 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

  1. A.V. Aho, J.E. Hopcroft, J.D. Ullman, The Design and Analysis of Computer Algorithms (Addison-Wesley, Boston, 1974)

    MATH  Google Scholar 

  2. 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)

    MATH  Google Scholar 

  3. J.J. Barton, L.R. Nackman, Scientific and Engineering C++ (Addison-Wesley, Reading, 1994)

    MATH  Google Scholar 

  4. S. Chapman, Fortran 95/2003 for Scientists and Engineers (McGraw-Hill, New York, 2007)

    Google Scholar 

  5. J.J. Dongarra, J.R. Bunch, C.B. Moler, G.W. Stewart, Linpack Users’ Guide (SIAM, Philadelphia, 1979)

    Book  Google Scholar 

  6. D. Flanagan, JavaScript: The Definitive Guide (O’Reilly, Sebastopol, 2011)

    MATH  Google Scholar 

  7. N.J. Higham, Accuracy and Stability of Numerical Algorithms (SIAM Publications, Philadelphia, 2002)

    Book  Google Scholar 

  8. N.M. Josuttis, The C++ Standard Library: A Tutorial and Reference (Addison-Wesley, Boston, 2000)

    Google Scholar 

  9. B.W. Kernighan, D.M. Ritchie, C Programming Language (Prentice-Hall, Englewood Cliffs, 1988)

    MATH  Google Scholar 

  10. D.E. Knuth, The Art of Computer Programming, 1: Fundamental Algorithms (Addison-Wesley, Reading, 1997)

    MATH  Google Scholar 

  11. M. Lutz, Learning Python: Power Object-Oriented Programming (O’Reilly Media, Sebastopol, 2013)

    Google Scholar 

  12. D. Musser, STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (Addison Wesley, Reading, 2001)

    Google Scholar 

  13. D.A. Patterson, J.L. Hennessy, Computer Organization and Design: The Hardware/Software Interface (Morgan Kaufmann, San Francisco, 1994)

    MATH  Google Scholar 

  14. B. Stroustrup, The C++ Programming Language, 3rd edn. (Addison-Wesley, Boston, 1997)

    MATH  Google Scholar 

  15. R.A. van de Geijn, E.S. Quintana-Ortí, The Science of Programming Matrix Computations (Lulu, Morrisville, 2008)

    Google Scholar 

  16. D. Vandevoorde, N.M. Josuttis, C++ Templates: The Complete Guide (Addison-Wesley, Boston, 2002)

    Google Scholar 

  17. R.C. Whaley, A. Petitet, Minimizing development and maintenance costs in supporting persistently optimized BLAS. Softw. Pract. Exp. 35(2), 101–121 (2005)

    Article  Google Scholar 

  18. J.H. Wilkinson, Rounding Errors in Algebraic Processes (Prentice-Hall, Englewood Cliffs, NJ, 1963)

    MATH  Google Scholar 

  19. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics