Computational Physics PS 587. We are still waiting for the Ph D class to join in… Till then, refresh some concepts in programming (later). Discuss some.

Slides:



Advertisements
Similar presentations
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Advertisements

Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved Floating-point Numbers.
Doing it without Floating Real and Solid Computing Abbas Edalat.
Faculty of Computer Science © 2006 CMPUT 229 Floating Point Representation Operating with Real Numbers.
Introduction to Scientific Computing ICE / ICE 508 Prof. Hyuckjae Lee KAIST- ICC
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
1 CSE1301 Computer Programming Lecture 30: Real Number Representation.
CSE1301 Computer Programming Lecture 33: Real Number Representation
Connecting with Computer Science, 2e
CSE 378 Floating-point1 How to represent real numbers In decimal scientific notation –sign –fraction –base (i.e., 10) to some power Most of the time, usual.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
Floating Point Numbers
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
History of the Quadratic Equation Sketch 10
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Lesson Objectives 1.You will gain a deeper understanding of the fundamental concept of pi. 2.You will discover that there is a special relationship between.
Chapter 5 Data representation.
Numerical Computations in Linear Algebra. Mathematically posed problems that are to be solved, or whose solution is to be confirmed on a digital computer.
Information Representation (Level ISA3) Floating point numbers.
Computer Organization and Architecture Computer Arithmetic Chapter 9.
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
The Persian mathematician Al Kwarizmi (780 – c
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Computing Systems Basic arithmetic for computers.
Introduction to Numerical Analysis I
Algebra Introduction & Useful Websites. Origin of Algebra Many say that the Babylonians first developed systems of quadratic equations. This calls for.
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
Negative Numbers.
All you need to know about Al-Khwarizmi! MADE BY LIBBY.
1 Lecture 2  Complement  Floating Point Number  Character Encoding.
CSC 221 Computer Organization and Assembly Language
16. Binary Numbers Programming in C++ Computer Science Dept Va Tech August, 1999 © Barnette ND, McQuain WD, Keenan MA 1 Binary Number System Base.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Measuring the Circle: The Story of Eric Wishnie Seth Coldsmith.
Computation & Machine, Ancient to Modern Review
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
CS1Q Computer Systems Lecture 2 Simon Gay. Lecture 2CS1Q Computer Systems - Simon Gay2 Binary Numbers We’ll look at some details of the representation.
How Numbers developed. by Pavitra Cumaraswamy. The history of Ancients using numbers The best known ancient numeral system is Roman numerals. In the 14.
Binary Arithmetic.
Data Representation: Floating Point for Real Numbers Computer Organization and Assembly Language: Module 11.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
10/7/2004Comp 120 Fall October 7 Read 5.1 through 5.3 Register! Questions? Chapter 4 – Floating Point.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
Introduction to Numerical Analysis I
Fundamentals of Computer Science
Objectives Today: P4 Data Types – Floating Points P4 Variable Quiz P3 Iteration and Selection Practical Are you logged on? Then come around the table Unit.
Backgrounder: Binary Math
Introduction To Computer Science
CS 232: Computer Architecture II
A Level Computing Component 2
PRESENTED BY J.SARAVANAN. Introduction: Objective: To provide hardware support for floating point arithmetic. To understand how to represent floating.
Systems Architecture I
Floating Point Representation
How to represent real numbers
How to represent real numbers
ECEG-3202 Computer Architecture and Organization
Faculty of Cybernetics, Statistics and Economic Informatics –
October 17 Chapter 4 – Floating Point Read 5.1 through 5.3 1/16/2019
Representation of real numbers
Floating Point Numbers
Systems Architecture I
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

Computational Physics PS 587

We are still waiting for the Ph D class to join in… Till then, refresh some concepts in programming (later). Discuss some general techniques which may be useful in any case Accuracy, and why it is important.

Decimal System Foundation of our computer revolution. Imagine computing in the Roman system CCXXXII times XLVIII, i.e. 232  48. Zero was invented by Indian mathematicians, who were inspired by the Babylonian and the Chinese number systems, particularly as used in abacuses.

The Discovery of Decimal Fractions Persians and Arabs invented the representation of decimal fractions that we use today. They discovered the rules for basic arithmetic operations that we now learn in school.

The Long Journey Diophantus 3 rd c. AD Brahmagupta, 598 AD Sridhara, 850 AD Adelard 1080 AD House of Wisdom 9 th c. AD Khwarizmi 780 AD Kashani 1380 AD

Khwarizmi (780 – 850) Settled in the House of Wisdom (Baghdad). Wrote three books: –Hindu Arithmetic –Al-jabr va Al-Moghabela –Astronomical Tables The established words: “ Algorithm ” from “ Al-Khwarizmi and “ Algebra ” from “ Al-jabr ” testify to his fundamental contribution to human thought.

The Long Journey Diophantus 3 rd c. AD Brahmagupta, 598 AD Sridhara, 850 AD Adelard 1080 AD House of Wisdom 9 th c. AD Khwarizmi 780 AD Kashani 1380 AD

Adelard of Bath (1080 – 1160) First English Scientist. Translated from Arabic to Latin Khwarizmi ’ s astronomical tables with their use of zero. After a long rivalry between Algorists and abacists, the decimal system replaced the abacus.

The Long Journey Diophantus 3 rd c. AD Brahmagupta, 598 AD Sridhara, 850 AD Adelard 1080 AD House of Wisdom 9 th c. AD Khwarizmi 780 AD Kashani 1380 AD

Kashani (1380 – 1429) Developed arithmetic algorithms for fractions, that we use today. Computed up to 16 decimals. He used Computed  up to 16 decimal places: Took the unit circle. The circumferences of the inscribed and circumscribed polygons with n sides give lower and upper bounds for 2 . Took the unit circle. The circumferences of the inscribed and circumscribed polygons with n sides give lower and upper bounds for 2 . Took the unit circle.

Kashani invented the first mechanical special purpose computers: –to find when the planets are closest, –to calculate longitudes of planets, –to predict lunar eclipses. Kashani (1380 – 1429)

Kashani’s Planetarium

Mechanical Computers in Europe Leibniz (1646 –1716) Pascal (1632 – 1662) Napier ( ) Oughtred (1575 – 1660) Babbage (1792 – 1871)

Modern Computers: Floating Point Numbers Any other number like  is rounded or approximated to a close floating point number. Represents only a finite collection of numbers. Sign Exponent Mantissa

Computers lie. One has to be alert.

Floating Point Arithmetic is not sound Especially when adding BIG numbers: But using IEEE’s standard precision, we get three different results,

What is 0 on the computer? 0 is the smallest number such that 0+1=1. Compute the 0 on your calculator. This is related to the number of bits used to represent a real number. Typically this will be something like

Floating Point Arithmetic is not sound A simple calculation shows: But using IEEE’s standard precision, we get three different results, all wrong.

Failure of Floating Point Computation Double precision floating-point arithmetic gives: The correct solution is:

Depending on the floating point format, the sequence tends to 1 or 2 or 3 or 4. In reality, it oscillates about 1.51 and Failure of Floating Point Computation

In any floating point format, the sequence converges to 100. In reality, it converges to 6. Floating PointExact Arithmetic

Failure of Floating Point Computation In any floating point format, the sequence converges to 100. In reality, it converges to 6. Floating PointExact Arithmetic

Failure of Floating Point Computation In any floating point format, the sequence converges to 100. In reality, it converges to 6. Floating PointExact Arithmetic