Computer Number Representation Example 2:The smallest positive norma/floating-point number possible for a 32-bit machine: Xm=00000000100000000000000000000000 =(0)(00000001)(00000000000000000000000 s=0.e=00000001=1,p=e-127=-126 f=0 =(-1)°×1.f×2=-127=1×2-125~12×10-38 1口“4元,4元t重QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09201517/103
Computer Number Representation Example 2: The smallest positive normal floating-point number possible for a 32-bit machine: Xmax = 00000 0001 0000 0000 0000 0000 0000 000 = (0) (0000 0001) (0000 0000 0000 0000 0000 000) s = 0, e = 0000 0001 = 1, p = e − 127 = −126 f = 0 ⇒ (−1) s × 1.f × 2 p=e−127 = 1 × 2 −126 ' 1.2 × 10−38 Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 17 / 103
Computer Number Representation Example 2:The smallest positive norma/floating-point number possible for a 32-bit machine: Xmax=00000000100000000000000000000000 =(0)(00000001)(00000000000000000000000) s=0.e=00000001=1.p=e-127=-126 f=0 →(-1)5×1.f×20=e1☒=1×2-1261.2×10-8 1口“4元,4元t重QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09201517/103
Computer Number Representation Example 2: The smallest positive normal floating-point number possible for a 32-bit machine: Xmax = 00000 0001 0000 0000 0000 0000 0000 000 = (0) (0000 0001) (0000 0000 0000 0000 0000 000) s = 0, e = 0000 0001 = 1, p = e − 127 = −126 f = 0 ⇒ (−1) s × 1.f × 2 p=e−127 = 1 × 2 −126 ' 1.2 × 10−38 Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 17 / 103
Computer Number Representation Example 2:The smallest positive norma/floating-point number possible for a 32-bit machine: Xmax=00000000100000000000000000000000 =(0)(00000001)(00000000000000000000000) s=0,e=00000001=1,p=e-127=-126 f=0 →(-1)5×1.f×2=e-127=1×2-126~1.2×10-38 ¥口“1元4元t至QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09201517/103
Computer Number Representation Example 2: The smallest positive normal floating-point number possible for a 32-bit machine: Xmax = 00000 0001 0000 0000 0000 0000 0000 000 = (0) (0000 0001) (0000 0000 0000 0000 0000 000) s = 0, e = 0000 0001 = 1, p = e − 127 = −126 f = 0 ⇒ (−1) s × 1.f × 2 p=e−127 = 1 × 2 −126 ' 1.2 × 10−38 Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 17 / 103
Computer Number Representation Example 3:The Smallest The smallest positive floating-point number possible for a 32-bit machine: ×mm=00000000000000000000000000000001 s=0.e=0.p=-126 f=0.00000000000000000000001=2-23 →(-1)°×0.f×2-25=2-1491.4×10-45 1口“回4元4元t至0QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 1409/201518/103
Computer Number Representation Example 3: The Smallest The smallest positive floating-point number possible for a 32-bit machine: Xmin = 0 0000 0000 0000 0000 0000 0000 0000 001 s = 0, e = 0, p = −126 f = 0.0000 0000 0000 0000 0000 001 = 2 −23 ⇒ (−1) s × 0.f × 2 −126 = 2 −149 ' 1.4 × 10−45 Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 18 / 103
Computer Number Representation Example 3:The Smallest The smallest positive floating-point number possible for a 32-bit machine: Xmin=00000000000000000000000000000001 s=0.e=0.p=-126 f=0.00000000000000000000001=2-23 ÷(-1)°×0.f×2-126=2-14914×10-45 1口“回4元4元t至0QC Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 1409/201518/103
Computer Number Representation Example 3: The Smallest The smallest positive floating-point number possible for a 32-bit machine: Xmin = 0 0000 0000 0000 0000 0000 0000 0000 001 s = 0, e = 0, p = −126 f = 0.0000 0000 0000 0000 0000 001 = 2 −23 ⇒ (−1) s × 0.f × 2 −126 = 2 −149 ' 1.4 × 10−45 Weihua Gu (Shanghai Jiao Tong University) Computational Physics Chapter 1 14/09/2015 18 / 103