



from math import isclose, sqrt
def 						UpperCamelCase      (  snake_case__			:       float			,	snake_case__			:       float			,	snake_case__			:       float      )      ->	tuple[float, float, float]:
   UpperCamelCase       :    List[Any]		      =      point_y / 4 / point_x
   UpperCamelCase       :    Tuple		      =      2 * normal_gradient / (1 + normal_gradient * normal_gradient)
   UpperCamelCase       :    Union[str, Any]		      =      (1 - normal_gradient * normal_gradient) / (
       1 + normal_gradient * normal_gradient
   )
   UpperCamelCase       :    int		      =      (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       :    Union[str, Any]		      =      outgoing_gradient**2 + 4
   UpperCamelCase       :    Optional[int]		      =      2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
   UpperCamelCase       :    Optional[Any]		      =      (point_y - outgoing_gradient * point_x) ** 2 - 100

   UpperCamelCase       :    Tuple		      =      (
       -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term      )
   ) / (2 * quadratic_term)
   UpperCamelCase       :    Dict		      =      (
       -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term      )
   ) / (2 * quadratic_term)

   # two solutions, one of which is our input point
   UpperCamelCase       :    Union[str, Any]		      =      x_minus if isclose(snake_case__			,	snake_case__      ) else x_plus
   UpperCamelCase       :    Any		      =      point_y + outgoing_gradient * (next_x - point_x)

   return next_x, next_y, outgoing_gradient
def 						UpperCamelCase      (  snake_case__			:       float = 1.4			,	snake_case__			:       float = -9.6      )      ->	int:
   UpperCamelCase       :    int		      =      0
   UpperCamelCase       :    float		      =      first_x_coord
   UpperCamelCase       :    float		      =      first_y_coord
   UpperCamelCase       :    float		      =      (10.1 - point_y) / (0.0 - point_x)

   while not (-0.01 <= point_x <= 0.01 and point_y > 0):
      UpperCamelCase      ,	UpperCamelCase      ,	UpperCamelCase       :    Dict		      =      next_point(snake_case__			,	snake_case__			,	snake_case__      )
      num_reflections += 1

   return num_reflections


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










"""simple docstring"""





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__A											=						{
    """configuration_x_clip""": [
        """XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """XCLIPConfig""",
        """XCLIPTextConfig""",
        """XCLIPVisionConfig""",
    ],
    """processing_x_clip""": ["""XCLIPProcessor"""],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A											=						[
      """XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """XCLIPModel""",
      """XCLIPPreTrainedModel""",
      """XCLIPTextModel""",
      """XCLIPVisionModel""",
  ]

if TYPE_CHECKING:
  from .configuration_x_clip import (
      XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
      XCLIPConfig,
      XCLIPTextConfig,
      XCLIPVisionConfig,
  )
  from .processing_x_clip import XCLIPProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_x_clip import (
        XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
        XCLIPModel,
        XCLIPPreTrainedModel,
        XCLIPTextModel,
        XCLIPVisionModel,
    )

else:
  import sys

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