Added code to do rounding and random rounding approximation