In [5]:
%matplotlib inline
import numpy
import matplotlib.pyplot as plt
d1values = [1,2,3,4,5,6,7,8,9]
d2values = [0,1,2,3,4,5,6,7,8,9]
E_values = [0,-1,-2]

fig = plt.figure(figsize=(10.0, 1.0))
axes = fig.add_subplot(1,1,1)


for E in E_values:
    for d1 in d1values:
        for d2 in d2values:
            axes.plot((d1+d2*0.1) * 10**E, 0.0, 'r+', markersize = 20)
            axes.plot(-(d1 + d2 * 0.1) * 10**E,0.0,'r+', markersize = 20)
            
axes.plot(0.0,0.0, '+', markersize = 20)
axes.plot([-10.0, 10.0],[0.0, 0.0], 'k')

axes.set_title("Distribution of Values")
axes.set_yticks([])
axes.set_xlabel("x")
axes.set_ylabel("")
axes.set_xlim([-0.1,0.1])
plt.show()



In [10]:
%matplotlib inline
import numpy
import matplotlib.pyplot as plt
d1values = [1,]
d2values = [0,1]
E_values = [-1,0,1]

fig = plt.figure(figsize=(10.0, 1.0))
axes = fig.add_subplot(1,1,1)


for E in E_values:
    for d1 in d1values:
        for d2 in d2values:
            axes.plot((d1+d2*0.5) * 2**E, 0.0, 'r+', markersize = 20)
            axes.plot(-(d1 + d2 * 0.5) * 2**E,0.0,'r+', markersize = 20)
            
axes.plot(0.0,0.0, '+', markersize = 20)
axes.plot([-2.0, 2.0],[0.0, 0.0], 'k')

axes.set_title("Distribution of Values")
axes.set_yticks([])
axes.set_xlabel("x")
axes.set_ylabel("")
axes.set_xlim([-3,3])
plt.show()



In [11]:
import numpy
print numpy.finfo(float).eps


2.22044604925e-16

In [12]:
print numpy.finfo(float).tiny


2.22507385851e-308

In [ ]: