COS 323 Fall 2008 Computing for the Physical and Social Sciences Ken Steiglitz.

Slides:



Advertisements
Similar presentations
8/25/ Floating Point Representation Major: All Engineering Majors Authors: Autar Kaw, Matthew Emmons
Advertisements

Roundoff and truncation errors
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Overview CNS 3320 – Numerical Software Engineering.
1cs542g-term CS542G - Breadth in Scientific Computing.
Numerical Methods for Engineers MECH 300 Hong Kong University of Science and Technology.
COS 323: Computing for the Physical and Social Sciences Szymon Rusinkiewicz.
1 CSE1301 Computer Programming Lecture 30: Real Number Representation.
MA5233: Computational Mathematics
COS 323: Computing for the Physical and Social Sciences Szymon Rusinkiewicz.
COS 323 Fall 2007 Computing for the Physical and Social Sciences Ken Steiglitz COS 323 Fall 2007 Computing for the Physical and Social Sciences Ken Steiglitz.
1cs542g-term CS542G - Breadth in Scientific Computing.
Revision.
COS 323 Fall 2009 Computing for the Physical and Social Sciences Ken Steiglitz.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Computer Science 210 Computer Organization Floating Point Representation.
Prepared by: Hind J. Zourob Heba M. Matter Supervisor: Dr. Hatem El-Aydi Faculty Of Engineering Communications & Control Engineering.
Developing Simulations and Demonstrations Using Microsoft Visual C++ Mike O’Leary Shiva Azadegan Towson University Supported by the National Science Foundation.
IEEE Floating Point Numbers Overview Noah Mendelsohn Tufts University Web: COMP.
Classical Waves Calculus/Differential Equations Refresher.
Yasser F. O. Mohammad Teaching Team Instructor: Yasser F. O. Mohammad Computers and Systems section (Intelligent Robotics)
ISE420 Algorithmic Operations Research Asst.Prof.Dr. Arslan M. Örnek Industrial Systems Engineering.
Error: Finding Creative ways to Screw Up CS 170: Computing for the Sciences and Mathematics.
BsysE595 Lecture Basic modeling approaches for engineering systems – Summary and Review Shulin Chen January 10, 2013.
Scientific Computing Topics for Final Projects Dr. Guy Tel-Zur Version 2,
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
EE 3561_Unit_1(c)Al-Dhaifallah EE 3561 : - Computational Methods in Electrical Engineering Unit 1: Introduction to Computational Methods and Taylor.
CSE 541 Rick Parent ELEMENTARY NUMERICAL METHODS Winter 2012.
Bill Walster June 15, 2006 Computing with Intervals Recent Developments.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /14/2013 Lecture 16: Floating Point Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
MATLAB
Chapter 2: First Steps in MuPAD MATLAB for Scientist and Engineers Using Symbolic Toolbox.
HP103: Intro to Matlab II HP 101 – MATLAB Wednesday, 1/14/2014
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
CSE 3802 / ECE 3431 Numerical Methods in Scientific Computation
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Computational Physics course at the University of Delhi Amitabha Mukherjee Department of Physics and Astrophysics and Centre for Science Education and.
Problems with Floating-Point Representations Douglas Wilhelm Harder Department of Electrical and Computer Engineering University of Waterloo Copyright.
Computer Organization and Design Information Encoding II Montek Singh Wed, Aug 29, 2012 Lecture 3.
Numerical Analysis Intro to Scientific Computing.
Modeling Biosystems Mathematical models are tools that biomedical engineers use to predict the behavior of the system. Three different states are modeled.
EE 460 Advanced Control and Sys Integration Monday, August 24 EE 460 Advanced Control and System Integration Slide 1 of 13.
Science Terms TAKS Objective 1.
1 Programming a Computer Lecture Ten. 2 Outline  A quick introduction to the programming language C  Introduction to software packages: Matlab for numerical.
IT11004: Data Representation and Organization Floating Point Representation.
14/02/ Floating Point Representation Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker Presented.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © 2005 Dr. John Lipp.
Numerical Analysis Intro to Scientific Computing.
CS 101 – Course outline Binary representations –Numbers –Text –Images –Linear vs. nonlinear information Excel –Formulas, functions –Tools: Solver, Goal.
Fundamentals of Computer Science
Software for scientific calculations
Biomedical Signal processing Chapter 1 Introduction
Roundoff and Truncation Errors
Floating Point Representation
Biomedical Signal processing Chapter 1 Introduction
Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
Biomedical Signal processing Chapter 1 Introduction
Electrical Engineering Majors Authors: Autar Kaw, Charlie Barker
COMS 161 Introduction to Computing
Roundoff and Truncation Errors
Numerical Computation and Optimization
Chemical Engineering Majors Authors: Autar Kaw, Charlie Barker
Introduction to Scientific Computing
Introduction CSE 541.
Presentation transcript:

COS 323 Fall 2008 Computing for the Physical and Social Sciences Ken Steiglitz

Mechanics and course structure See course web page: COS 323 homeCOS 323 home Syllabus: lecture outlines, slides (some courtesy of Prof. Szymon Rusinkiewicz), some detailed notes, etc. Master list of references in pdf, some on reserve in library

Goal of course: learn “scientific” computing through applications 4 assignments: population genetics, finance, chaos, image processing Term paper

Major Topic Outline Simulation, using random numbers, experimenting Integration, root-finding Optimization, linear programming Ordinary diff. eqs., Partial diff. eqs. DSP Linear systems, image processing (Matlab)  Assign. 1  Assign. 2  Assign. 3  Assign. 4

Major Topic Outline Simulation, using random numbers, experimenting Integration, root-finding Optimization, linear programming Ordinary diff. eqs., Partial diff. eqs. DSP Linear systems, image processing (Matlab) * Numerical analysis  Assign. 1  Assign. 2  Assign. 3  Assign. 4

“Personal” vs. “Scientific” computing Early computers, up to the 70s or 80s, were built to solve problems. They were “scientific computers”, or SCs, so to speak Today the vast majority of computers are PCs

What this course is about PC: Cycles used mainly for fixed, widely used programs, for communication, rendering, DSP, etc. SC: Involves developing programs: programming, modeling, experimentation  Machines are driven by the mass market

Stanisław Ulam with MANIC I --- about 10 4 ops/sec

Reading, background Optional text: Numerical Recipes in C [PTVF92]. Really a reference available on webhttp:// Master reference list COS 126 is entirely adequate, don't get too fancy --- We're after the algorithmic and numerical issues MAT 104 is entirely adequate Referencing all sources: Do it!

Modeling in general Purposes: quantitative prediction, qualitative prediction, development of intuition, theory formation, theory testing Independent and dependent variables, space, time Discrete vs. continuous choices for space, time, dependent variables Philosophy: painting vs. photography

Examples Discrete-time/discrete-space/discrete-value spatial epidemic models Sugarscape seashells lattice gasses cellular automata in general

Examples, con’t Difference equations population growth population genetics digital signal processing, digital filters, FFT, etc.

Examples, con’t Event-driven simulation market dynamics population genetics network traffic

Examples, con’t Ordinary differential equations market dynamics epidemics seashells insulin-glucose regulation immune system predator-prey system n-body problem, solar system, formation of galaxy

Examples, con’t Partial differential equations heat diffusion population dispersion wave motion in water, ether, earth, … spread of genes in population classical mechanics quantum mechanics

Examples, con’t Combinatorial optimization scheduling routing, traffic oil refining layout partition … and many more

Numbers Fixed-point (absolute precision) Floating-point (relative precision) scientific notation, like 3x10 -8 Single-precision: 32 bits, 8 bit exponent, about 7 decimal-place accuracy Double-precision: 64 bits, 11 bit exponent, about 16 decimal-place accuracy [see IEEE 754 standard]

Numbers (con’t) Example: 1/10 has no exact representation in binary floating-point: main() { /* main */ float x; x = 1./10.; printf("x = %28.25f\n", x); } x =

Numbers (con’t) Such roundoff errors can accumulate in iterative computations: main() { /* main */ float x, sum; int i; x = 1./10.; sum = 0.; for (i=0;i< ;i++) sum += x; printf("sum = %28.25f\n", sum); } sum =

More subtle problem Roots of quadratic: Relative error in x1 is huge! What’s the problem? main() { /* main */ printf("Solving quadratic\n"); printf("Actual root = \n"); printf("Actual root = \n"); float a, b, c, d, x1, x2; a = 1.; b = ; c = 1.; d = b*b - 4.*a*c; x1 = (-b + sqrt(d))/2.; x2 = (-b - sqrt(d))/2.; printf("x1= %28.25f\nx2= %28.25f\n", x1, x2); } Solving quadratic Actual root = Actual root = x1= x2= X 2 – 9999 x + 1 = 0

Higher-level languages such as Matlab, Maple, Mathematica |\^/| Maple V Release 5 (WMI Campus Wide License)._|\| |/|_. Copyright (c) by Waterloo Maple Inc. All rights \ MAPLE / reserved. Maple and Maple V are registered trademarks of Waterloo Maple Inc. | Type ? for help. # solving ill-conditioned quadratic # x^ *x+1 = 0 # b := x1 := ( -b - sqrt(b*b - 4) )/2; Digits := 7 x1 := 0 Digits := 8 x1 :=.0001 Digits := 20 x1 := Digits := 40 x1 := Mutiple-precision arithmetic (software)  Experimental technique