def is_close(float1, float2, relative_tolerance=1e-9, absolute_tolerance=0.0):
    """ This is a comparison for floats and taken from Python 3.5

    :param float1: Float - Value 1
    :param float2: Float - Value 1
    :param relative_tolerance: the relative tolerance in nano
    :param absolute_tolerance: minimum absolute tolerance
    :return: boolean
    """
    return abs(float1 - float2) <= max(relative_tolerance * max(abs(float1), abs(float2)), absolute_tolerance)