I just discovered a bug, and, even though it is of minor importance, I would like to know if anyone knew why it arises.
bin_width=0.005
max_value=0.7
min_value=0.
bins_=[]
num_step=int((max_value-min_value)/bin_width)
for i in range(0,num_step):
print i,i*bin_width
bins_=bins_+[i*bin_width]
print bins_
In this code, the value i*bin_width sometimes differs from the one introduce in the array. For example, bins_[41]=0.20500000000000002, whereas 41*0.005=0.205.
Is that a known bug, and why does it occur ?
Thank you