On Fri, Mar 12, 2010 at 11:48 AM, Raph Frank <raphfrk at gmail.com> wrote: > You could just define it as > > V_i/q - round(V_i/q) + 0.5 Actually, these should be: round(V_i/q) + 0.5 - V_i/q and round(V_i/q)*q + q/2 - V_i (to rescale to number of votes margin)