Comment 15 for bug 882036

Revision history for this message
Pieter J. Kersten (EduSense BV) (pieterj) wrote : Re: rounding error

Isn't this related to http://www.diycalculator.com/sp-round.shtml#A3 ?

BTW, the following function 'corrects' Pythons arithmetic rounding:

def roundf(f, prec=0):
    return round(f + (.1 / pow(10, prec + 2)), prec)