
"""simple docstring"""





from math import isclose, sqrt
def      a__			(   lowerCAmelCase__			,    lowerCAmelCase__			,    lowerCAmelCase__   ):
      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(lowerCAmelCase__			,    lowerCAmelCase__   ) else x_plus
      UpperCAmelCase_    				=							point_y + outgoing_gradient * (next_x - point_x)

      return next_x, next_y, outgoing_gradient
def      a__			(   lowerCAmelCase__ = 1.4			,    lowerCAmelCase__ = -9.6   ):
      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(lowerCAmelCase__			,    lowerCAmelCase__			,    lowerCAmelCase__   )
            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


lowerCamelCase      =		{
    """configuration_swinv2""": ["""SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP""", """Swinv2Config"""],
}


try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowerCamelCase      =		[
      """SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """Swinv2ForImageClassification""",
      """Swinv2ForMaskedImageModeling""",
      """Swinv2Model""",
      """Swinv2PreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_swinva import SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinvaConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_swinva import (
        SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST,
        SwinvaForImageClassification,
        SwinvaForMaskedImageModeling,
        SwinvaModel,
        SwinvaPreTrainedModel,
    )


else:
  import sys

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




