Introduction to Languages for Scientific Computing
When: Summer semester 2018
CAMPUS #: 18ss57513
Contact: Prof. Paolo Bientinesi
Prerequisites
Basic knowledge of numerical linear algebra, programming languages, algorithms.
Overview
The goal of the course is to provide the students with tools to achieve effective prototyping through highlevel languages, and write highperformance programs in C and/or Fortran. Programs will be evaluated with respect to metrics such as performance, readability, elegance.
We will discuss programming languages and tools especially suitable for numerical & symbolic computations, data visualization, and highperformance computations. The focus is on Matlab, Mathematica and C; no prior knowledge of these languages is required. We also cover standard computational tools and Fortranbased libraries such as BLAS and LAPACK.
The course is hands on. The students are expected to solve (and compete on) simple programming assignments and to present approach & results in front of the class.
Tentative syllabus
 Introduction
 Floating point arithmetic
 History of languages
 Matlab
 Data visualization
 Mathematica
 Maps, functions
 Fixed & highprecision numbers; symbols
 Imperative vs. functional programming
 C
 Performance
 Numerical libraries
Lectures & Exercises
Room: 2181P11 (MeT P 11), Kopernikusstraße 14
 Monday, 16:15  17:45, 2181P11 (MeT P 11) (lecture)
 Friday, 16:15  17:45, 2181P11 (MeT P 11) (lecture + exercise)
Office hours

Tuesdays, 11am1pm, by appointment.
AICES R432 (Rogowski Building  Schinkelstrasse 2)
Schedule

Friday, 13.04 FIRST CLASS [PDF] 
Friday, 20.04 Floating point arithmetic (1/3) [PDF] 
Monday, 23.04 Floating point arithmetic (2/3) [PDF][Pi up][Pi down] 
Friday, 27.04 Floating point arithmetic (3/3) [PDF] 
Monday, 30.04 Intro to programming [PDF] Matlab 1/5 [Diary] 
Friday, 04.05 Matlab 2/5 [Diary] Challenge #1 [PDF] Winner: Mietze Tang [PDF]. Honorable mentions: Nils Frahm, Ashutosh Manchanda 
Monday, 07.04 Floating point arithmetic: Exercises [PDF], Test exam [PDF][Solutions] 
Friday, 11.05 Matlab 3/5 [Diary], [Files] 
Monday, 14.05 Matlab 4/5 [Diary], [Files] 
Friday, 18.05 Matlab 5/5 [Diary], [Files] 
Tuesday, 22.05 Challenge #2 [PDF] [Rec] [MV] Winner: Lucas Wiens. Honorable mention: Benjamin Jung 
Monday, 28.05 Mathematica 1/8 [Notebook 1] 
Friday, 01.06 Matlab exercises [PDF] [Files] 
Monday, 04.06 C 1/4 [Files]  Dr. William McDoniel 
Friday, 08.06 C 2/4 [Files]  Dr. William McDoniel 
Monday, 11.06 C 3/4 [Files]  Dr. William McDoniel 
Friday, 15.06 C 4/4 [Files] 
Monday, 18.06 Mathematica 2/8 [Notebook 2] 
Tuesday, 19.06 Extra Lecture: "Optimal Performance Numerical Code: Challenges and Solutions" by Prof. Markus Pueschel (ETH). 10:3012:00 + 13:3015:00, Room 115. [html] 
Friday, 22.06 Mathematica 3/8 [Notebook 3] 
Monday, 25.06 Mathematica 4/8 [Notebook 4] Challenge #3 
Friday, 29.06 Mathematica 5/8 [Notebook 5] 
Monday, 02.07 Mathematica 6/8 [Notebook 6] 
Friday, 06.07 Challenge #3. [Notebook]
Winners: Jonas Dedden [solution], Karim Abou Zeid [(complicated) solution].Exercises: [PDF] 
Monday, 09.07 Mathematica 7/8 [Notebook 7] 
Tuesday, 10.07 Challenge #4 [PDF] Winner: Mietze Tang. Honorable mentions: Jonas Dedden, Mara Caltapanides 
Friday, 13.07 Mathematica 8/8 [Notebook 8] 
Monday, 16.07 Challenge #4 [Solutions] Recap [Notebook] 
Friday, 20.07 [Exercises]
Exam
 02.08.2018, 10:3013:00, HKW 1, HKW 2
 14.09.2018, 17:0019:30, HKW 1