1 / 24

Computational Physics

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.

cher
Télécharger la présentation

Computational Physics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 Adelard 1080 AD Khwarizmi 780 AD Kashani 1380 AD House of Wisdom 9thc. AD Brahmagupta, 598 AD Sridhara, 850 AD Diophantus 3rdc. 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-Khwarizmiand “Algebra” from “Al-jabr”testify to his fundamentalcontribution to human thought.

  7. The Long Journey Adelard 1080 AD Khwarizmi 780 AD Kashani 1380 AD House of Wisdom 9thc. AD Brahmagupta, 598 AD Sridhara, 850 AD Diophantus 3rdc. AD

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

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

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

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

  12. Kashani’s Planetarium

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

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

  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. Double precision floating-point arithmetic gives: • The correct solution is: Failure of Floating Point Computation

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

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

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

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

  24. 3.14159265358979323846264338327950288419716939937510582974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609...3.14159265358979323846264338327950288419716939937510582974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609...

More Related