Bins are numbered starting at 1 through the number of bins
the number of the bin where x is located
double