Calculating Modes and Medians From Histograms