fix my wrong rounding policy to banker's rounding
use a variable denominator to replace some shared calculation