



"""simple docstring"""


from math import isclose, sqrt







def        lowercase		(					_SCREAMING_SNAKE_CASE      :  str    ,   _SCREAMING_SNAKE_CASE      :  Union[str, Any]    ,   _SCREAMING_SNAKE_CASE      :  List[Any] ):






				'''simple docstring'''



				_UpperCAmelCase							=			point_y / 4 / point_x
				_UpperCAmelCase							=			2 * normal_gradient / (1 + normal_gradient * normal_gradient)
				_UpperCAmelCase							=			(1 - normal_gradient * normal_gradient) / (
				    1 + normal_gradient * normal_gradient
				)
				_UpperCAmelCase							=			(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
				_UpperCAmelCase							=			outgoing_gradient**2 + 4
				_UpperCAmelCase							=			2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
				_UpperCAmelCase							=			(point_y - outgoing_gradient * point_x) ** 2 - 100

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

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

				return next_x, next_y, outgoing_gradient







def        lowercase		(					_SCREAMING_SNAKE_CASE      :  Tuple = 1.4    ,   _SCREAMING_SNAKE_CASE      :  Optional[Any] = -9.6 ):






				'''simple docstring'''



				_UpperCAmelCase							=			0
				_UpperCAmelCase							=			first_x_coord
				_UpperCAmelCase							=			first_y_coord
				_UpperCAmelCase							=			(10.1 - point_y) / (0.0 - point_x)

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

				return num_reflections


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










import math
import unittest



def    __lowercase   (      _SCREAMING_SNAKE_CASE	) ->   bool:


      '''simple docstring'''


      assert isinstance(_SCREAMING_SNAKE_CASE ,						_SCREAMING_SNAKE_CASE	) and (
          number >= 0
      ), "'number' must been an int and positive"

      if 1 < number < 4:
            # 2 and 3 are primes
            return True
      elif number < 2 or number % 2 == 0 or number % 3 == 0:
            # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
            return False

      # All primes number are in format of 6k +/- 1
      for i in range(5 ,						int(math.sqrt(_SCREAMING_SNAKE_CASE	) + 1	) ,						6	):
            if number % i == 0 or number % (i + 2) == 0:
                  return False
      return True

class 		UpperCamelCase__ (      unittest.TestCase   ):



     '''simple docstring'''

     def 				SCREAMING_SNAKE_CASE__  (							self						:    Dict       )     ->		Tuple:




           '''simple docstring'''


           self.assertTrue(is_prime(2       )       )
           self.assertTrue(is_prime(3       )       )
           self.assertTrue(is_prime(5       )       )
           self.assertTrue(is_prime(7       )       )
           self.assertTrue(is_prime(11       )       )
           self.assertTrue(is_prime(13       )       )
           self.assertTrue(is_prime(17       )       )
           self.assertTrue(is_prime(19       )       )
           self.assertTrue(is_prime(23       )       )
           self.assertTrue(is_prime(29       )       )






     def 				SCREAMING_SNAKE_CASE__  (							self						:    Optional[int]       )     ->		Tuple:




           '''simple docstring'''


           with self.assertRaises(lowerCamelCase__       ):
                 is_prime(-19       )
           self.assertFalse(
               is_prime(0       )						,"""Zero doesn't have any positive factors, primes must have exactly two."""						,)
           self.assertFalse(
               is_prime(1       )						,"""One only has 1 positive factor, primes must have exactly two."""						,)
           self.assertFalse(is_prime(2 * 2       )       )
           self.assertFalse(is_prime(2 * 3       )       )
           self.assertFalse(is_prime(3 * 3       )       )
           self.assertFalse(is_prime(3 * 5       )       )
           self.assertFalse(is_prime(3 * 5 * 7       )       )


if __name__ == "__main__":
      unittest.main()


