<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def floor_nearest(x, dx=1):
 """ floor a number to within a given rounding accuracy """

    precision = get_sig_digits(dx)
    return round(math.floor(float(x) / dx) * dx, precision)