Numerical methods. Note 1
Home ] Introduction Numerical Methods. Note  « 1 »

Introduction

  1. The subject of the course is the numerical methods which are commonly used in physics. The algorithms will be discussed at the lectures. The students will implement (some of) the discussed algorithms using a programming language of their choice.
  2. About programming languages. Compiled and interpreted languages. Functional and imperative. Object-Oriented. Scripting languages. Libraries: Netlib.org and GSL (GNU Scientific Library).
  3. The students can choose their favourite programming language for the exercises. The "official" languages this year are C, Octave, Haskell and Scheme.
  4. The solutions to the exercises (that is the source code and the output) should be arranged into a web-page.
  5. The UNIX programming environment. Text editors: nano, jed, vi, emacs. The make program.

Exercises

  1. Choose your programming language(s) for the exercises.
  2. Prepare your web-page for the exercises. If you don't yet have your homepage on our server, the easiest way to create it is like this: login into lifa.phys.au.dk and
    mkdir ~/public_html
    echo 'my homepage...' > ~/public_html/home.htm
    mkdir ~/public_html/numeric
    echo 'mumerical methods...' > ~/public_html/numeric/home.htm
    chmod -R go+rx ~/public_html
    
    In unix tilde is an abbreviation for you home directory. Now the address http://www.phys.au.dk/~your_login_name points to your ~/public_html/home.htm file, while http://www.phys.au.dk/~your_login_name/numeric points to your ~/public_html/numeric should then be the place for your solutions to the exercises. Email me the address of your web-page.
  3. Make a Hello-World program (a program that prints Hello-World on the screen) in your programming language.
  4. Make a program to calculate the sums
    Sup(N) = ∑i=1...N (1/i)
    Sdown(N) = ∑i=N...1 (1/i)
    in single and double precision. Compare Sup and Sdown for N=1000000. Explain the difference.

"Copyleft" © 2001 D.V.Fedorov (fedorov@ifa.au.dk)