






from math import isclose, sqrt
def 						_a    (      a :float	,							a :float	,							a :float )							->			tuple[float, float, float]:
 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(a	,							a ) else x_plus
 a		  =      point_y + outgoing_gradient * (next_x - point_x)

 return next_x, next_y, outgoing_gradient
def 						_a    (      a :float = 1.4	,							a :float = -9.6 )							->			int:
 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(a	,							a	,							a )
  num_reflections += 1

 return num_reflections


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










from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


UpperCAmelCase__				   =		{
    "configuration_groupvit": [
        "GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "GroupViTConfig",
        "GroupViTOnnxConfig",
        "GroupViTTextConfig",
        "GroupViTVisionConfig",
    ],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__				   =		[
         "GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
         "GroupViTModel",
         "GroupViTPreTrainedModel",
         "GroupViTTextModel",
         "GroupViTVisionModel",
     ]

try:
     if not is_tf_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__				   =		[
         "TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
         "TFGroupViTModel",
         "TFGroupViTPreTrainedModel",
         "TFGroupViTTextModel",
         "TFGroupViTVisionModel",
     ]

if TYPE_CHECKING:
     from .configuration_groupvit import (
         GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
         GroupViTConfig,
         GroupViTOnnxConfig,
         GroupViTTextConfig,
         GroupViTVisionConfig,
     )

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_groupvit import (
              GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
              GroupViTModel,
              GroupViTPreTrainedModel,
              GroupViTTextModel,
              GroupViTVisionModel,
          )

     try:
          if not is_tf_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_tf_groupvit import (
              TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
              TFGroupViTModel,
              TFGroupViTPreTrainedModel,
              TFGroupViTTextModel,
              TFGroupViTVisionModel,
          )

else:
     import sys

     UpperCAmelCase__				   =		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


