def ceil_nearest ( x , dx = 1 ) : precision = get_sig_digits ( dx ) return round ( math . ceil ( float ( x ) / dx ) * dx , precision )
python function round to nearest 1/10th
ceil a number to within a given rounding accuracy
def ceil_nearest(x, dx=1):
    """
    ceil a number to within a given rounding accuracy
    """
    precision = get_sig_digits(dx)
    return round(math.ceil(float(x) / dx) * dx, precision)