



from math import isclose, sqrt





def 					__snake_case     (      _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase    ):
    __a							=    point_y / 4 / point_x
    __a							=    2 * normal_gradient / (1 + normal_gradient * normal_gradient)
    __a							=    (1 - normal_gradient * normal_gradient) / (
        1 + normal_gradient * normal_gradient
    )
    __a							=    (sa - ca * incoming_gradient) / (ca + sa * incoming_gradient)

    # to find the next point, solve the simultaeneous equations:
    # y^2 + 4x^2 = 100
    # y - b = m * (x - a)
    # ==> A x^2 + B x + C = 0
    __a							=    outgoing_gradient**2 + 4
    __a							=    2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
    __a							=    (point_y - outgoing_gradient * point_x) ** 2 - 100

    __a							=    (
        -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term    )
    ) / (2 * quadratic_term)
    __a							=    (
        -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term    )
    ) / (2 * quadratic_term)

    # two solutions, one of which is our input point
    __a							=    x_minus if isclose(_UpperCAmelCase       ,			_UpperCAmelCase    ) else x_plus
    __a							=    point_y + outgoing_gradient * (next_x - point_x)

    return next_x, next_y, outgoing_gradient





def 					__snake_case     (      _UpperCAmelCase = 1.4       ,			_UpperCAmelCase = -9.6    ):
    __a							=    0
    __a							=    first_x_coord
    __a							=    first_y_coord
    __a							=    (10.1 - point_y) / (0.0 - point_x)

    while not (-0.01 <= point_x <= 0.01 and point_y > 0):
        __a	,       __a	,       __a							=    next_point(_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase    )
        num_reflections += 1

    return num_reflections


if __name__ == "__main__":
 print(f'{solution() = }')










def 					__snake_case     (      _UpperCAmelCase    ):
    if not isinstance(_UpperCAmelCase       ,			_UpperCAmelCase    ):
        raise TypeError('''Input value must be an \'int\' type'''    )

    __a							=    0
    while number:
        position += 1
        number >>= 1

    return position


if __name__ == "__main__":
 import doctest

 doctest.testmod()





