


from math import isclose, sqrt

def   UpperCamelCase			(      snake_case__						,  snake_case__						,  snake_case__):
						lowerCAmelCase_	:     Optional[int]          = point_y / 4 / point_x
						lowerCAmelCase_	:     Dict          = 2 * normal_gradient / (1 + normal_gradient * normal_gradient)
						lowerCAmelCase_	:     List[Any]          = (1 - normal_gradient * normal_gradient) / (
						    1 + normal_gradient * normal_gradient
						)
						lowerCAmelCase_	:     List[Any]          = (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
						lowerCAmelCase_	:     Optional[Any]          = outgoing_gradient**2 + 4
						lowerCAmelCase_	:     str          = 2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
						lowerCAmelCase_	:     Union[str, Any]          = (point_y - outgoing_gradient * point_x) ** 2 - 1_00

						lowerCAmelCase_	:     Optional[Any]          = (
						    -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term)
						) / (2 * quadratic_term)
						lowerCAmelCase_	:     Any          = (
						    -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term)
						) / (2 * quadratic_term)

						# two solutions, one of which is our input point
						lowerCAmelCase_	:     Dict          = x_minus if isclose(__lowerCAmelCase						,  __lowerCAmelCase) else x_plus
						lowerCAmelCase_	:     Any          = point_y + outgoing_gradient * (next_x - point_x)

						return next_x, next_y, outgoing_gradient

def   UpperCamelCase			(      snake_case__ = 1.4						,  snake_case__ = -9.6):
						lowerCAmelCase_	:     List[str]          = 0
						lowerCAmelCase_	:     Dict          = first_x_coord
						lowerCAmelCase_	:     int          = first_y_coord
						lowerCAmelCase_	:     Union[str, Any]          = (10.1 - point_y) / (0.0 - point_x)

						while not (-0.01 <= point_x <= 0.01 and point_y > 0):
												lowerCAmelCase_    ,					lowerCAmelCase_    ,					lowerCAmelCase_	:     Any          = next_point(__lowerCAmelCase						,  __lowerCAmelCase						,  __lowerCAmelCase)
												num_reflections += 1

						return num_reflections


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




import math





def 						SCREAMING_SNAKE_CASE__     (   __lowerCAmelCase     ,		__lowerCAmelCase				):

    if initial_intensity < 0:
        raise ValueError("The value of intensity cannot be negative"				)
        # handling of negative values of initial intensity
    if angle < 0 or angle > 360:
        raise ValueError("In Malus Law, the angle is in the range 0-360 degrees"				)
        # handling of values out of allowed range
    return initial_intensity * (math.cos(math.radians(__lowerCAmelCase				)				) ** 2)


if __name__ == "__main__":
     import doctest

     doctest.testmod(name='''malus_law''')



