Comment 18 for bug 882036

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

Sorry, there was a typo in algorithm #17:

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