Title: Computational Physics
1Computational Physics
2We 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.
3Decimal 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.
4The 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.
5The 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
6Khwarizmi (780 850)
- Settled in the House of Wisdom (Baghdad).
- Wrote three books
- Hindu Arithmetic
- Al-jabr va Al-Moghabela
- Astronomical Tables
- The established wordsAlgorithm from
Al-Khwarizmiand Algebra from
Al-jabrtestify to his fundamentalcontribution
to human thought.
7The 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
8Adelard of Bath (1080 1160)
- First English Scientist.
- Translated from Arabic to Latin Khwarizmis
astronomical tables with their use of zero.
9The 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
10Kashani (1380 1429)
- Developed arithmetic algorithms for fractions,
that we use today.
11Kashani (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.
12Kashanis Planetarium
13Mechanical Computers in Europe
14Modern Computers Floating Point Numbers
- Any other number like ? is rounded or
approximated to a close floating point number.
15Computers lie.
16Floating Point Arithmetic is not sound
- Especially when adding BIG numbers
- But using IEEEs standard precision, we get
three different results,
17What is 0 on the computer?
- 0 is the smallest number such that 011.
- 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.
18Floating Point Arithmetic is not sound
- A simple calculation shows
- But using IEEEs standard precision, we get
three different results, all wrong.
19Failure of Floating Point Computation
20Failure 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.
21Failure of Floating Point Computation
- In any floating point format, the sequence
converges to 100. - In reality, it converges to 6.
22Failure of Floating Point Computation
- In any floating point format, the sequence
converges to 100. - In reality, it converges to 6.
23Failure of Floating Point Computation
- In any floating point format, the sequence
converges to 100. - In reality, it converges to 6.
243.141592653589793238462643383279502884197169399375
10582974944592307816406286208998628034825342117067
98214808651328230664709384460955058223172535940812
84811174502841027019385211055596446229489549303819
64428810975665933446128475648233786783165271201909
14564856692346034861045432664821339360726024914127
37245870066063155881748815209209628292540917153643
67892590360011330530548820466521384146951941511609
...