<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Floating Points
Lets start with a simple example
Step1:  It is not! lets try another example,
$2^{30} \times 2^{-30}$
Step2:  This time the summation seems correct. That is the same as 2/3 = 0.6666...667
Such an error could cost people's life and money
Step3:  Small numbers
Calculate this sum
<ASSISTANT_TASK:>
Python Code:
a = 0
dx = 10**-9
for i in range(10**9):
    a += dx
print(a)
Explanation: Floating Points
Lets start with a simple example:
    $10^9 \times 10^{-9} = ?$  
    It is supposed to be 1.
End of explanation
a = 0
dx = 2**-30
for i in range(2**30):
    a += dx
print(a)
Explanation: It is not! lets try another example,
$2^{30} \times 2^{-30}$
End of explanation
a = 2*10**-16
a_ = (1+10**-16)-(1-10**-16)
(a_-a)/a
a = 2*10**-16
a_ = (1-1+10**-16+10**-16)
(a_-a)/a
Explanation: This time the summation seems correct. That is the same as 2/3 = 0.6666...667
Such an error could cost people's life and money: http://ta.twi.tudelft.nl/nw/users/vuik/wi211/disasters.html
That is the result of how floating points are handeled in PC:
IEEE floating point
Now lets observe other errors.
Substraction
$\hat{a} = (1+10^{-16}) - (1-10^{-16})$
$\Delta a = \hat{a} - a$
$\frac{\Delta a}{a} = ?$
End of explanation
s = 1
for i in range(10**7):
    s+=10**-16
print(s)
s = 0
for i in range(10**7):
    s+=10**-16
s+=1
print(s)
Explanation: Small numbers
Calculate this sum: $1 + \sum^{10^7} 10^{-16}$
End of explanation
<END_TASK>