Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Computational Physics PS 587

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

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

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

5 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

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

7 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

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

9 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

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

11 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)

12 Kashani’s Planetarium

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

14 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

15 Computers lie. One has to be alert.

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

17 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 10 -8.

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

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

20 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 2.37. Failure of Floating Point Computation

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

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

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

24 3.141592653589793238462643383279502884197169399375105829 74944592307816406286208998628034825342117067982148086513 28230664709384460955058223172535940812848111745028410270 19385211055596446229489549303819644288109756659334461284 75648233786783165271201909145648566923460348610454326648 21339360726024914127372458700660631558817488152092096282 92540917153643678925903600113305305488204665213841469519 41511609...


Download ppt "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."

Similar presentations


Ads by Google