def x_within_y_percent_of_z(x_to_compare, y_percent, z_base):
    """ Return true if the input values are within a given y percent range. """
    z_lower = (100 - y_percent) * z_base / 100.0
    z_upper = (100 + y_percent) * z_base / 100.0
    return bool(z_lower <= x_to_compare <= z_upper)