calc_max_precision function

Calculate the mode value at maximum precision