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