import math


def roundToBase(x, base):
    """Given a float and a base, return the spanning values to the nearest base"""
    base_log = int(-1 * math.log10(base))
    base_ceil = round(float(base * math.ceil(float(x) / base)), base_log)
    base_floor = round(float(base * math.floor(float(x) / base)), base_log)
    return [base_floor, base_ceil]