Computational Physics Chapter 1 Weihua Gu Shanghai Jiao Tong University 14/09/2015 口回1元,4元↑至0QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/0920151/103
Computational Physics Chapter 1 Weihua Gu Shanghai Jiao Tong University 14/09/2015 Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 1 / 103
Chapter 1 Errors Uncertainties in Computations Last update:September 12,2016 1口“回4元4元t至0QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/0920152/103
Chapter 1 Errors & Uncertainties in Computations Last update: September 12, 2016 Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 2 / 103
Computers are incredibly fast,accurate,and stupid;humans are incredibly slow,inaccurate,and brilliant;together they are powerful beyond imagination. Albert Einstein ¥口“1元4元↑至QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09201531103
Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate, and brilliant; together they are powerful beyond imagination. Albert Einstein Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 3 / 103
Computer Number Representation Outline Computer Number Representation 2 Machine Precision Types of Errors Subtractive Cancelation and Misc Operations 5 Effective Algorithm Reducing Steps of Computation Error Assessment Best Approximation Review Summary 口“4元元t重0QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/20154/103
Computer Number Representation Outline 1 Computer Number Representation 2 Machine Precision 3 Types of Errors 4 Subtractive Cancelation and Misc Operations 5 Effective Algorithm 6 Reducing Steps of Computation 7 Error Assessment 8 Best Approximation 9 Review & Summary Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 4 / 103
Computer Number Representation Binary Form o All numbers are stored in memory in binary form. Word length is the number of bits used to store a number. expressed in bytes. 1 byte =1 B=8 bits A typical printed page required ~3kB Using 64 bits integers in the range 1-203~1019 (the sian represented by the first bit) The ratio of the size of the universe to the size of a proton~ 1041 1口“4元,4元↑重QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/0920155/103
Computer Number Representation Binary Form All numbers are stored in memory in binary form. Word length is the number of bits used to store a number, expressed in bytes. 1 byte ≡ 1 B = 8 bits A typical printed page required ∼3kB. Using 64 bits ⇒ integers in the range 1 − 2 63 ∼ 1019 (the sign represented by the first bit). The ratio of the size of the universe to the size of a proton ∼ 1041 . Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 5 / 103