Aaron Robson <shiny.mag...@googlemail.com> added the comment: When i run into I have to bodge around it in ways like the below code.
I've only ever used round half up, has anyone here even used Bankers Rounding by choice before? For reference here are the other options: http://en.wikipedia.org/wiki/Rounding#Tie-breaking def RoundHalfUp(number): '''http://en.wikipedia.org/wiki/Rounding#Round_half_up 0.5 and above round up else round down. ''' trunc = int(number) fractionalPart = number - trunc if fractionalPart < 0.5: return trunc else: ceil = trunc + 1 return ceil ---------- nosy: +AaronR _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13060> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com