


from math import isclose, sqrt



def 			lowerCAmelCase (		lowerCAmelCase_ ,   lowerCAmelCase_ ,   lowerCAmelCase_ )-> tuple[float, float, float]:
				lowerCAmelCase_ :      Any    				=				point_y / 4 / point_x
				lowerCAmelCase_ :      str    				=				2 * normal_gradient / (1 + normal_gradient * normal_gradient)
				lowerCAmelCase_ :      Union[str, Any]    				=				(1 - normal_gradient * normal_gradient) / (
				    1 + normal_gradient * normal_gradient
				)
				lowerCAmelCase_ :      Optional[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
				lowerCAmelCase_ :      Dict    				=				outgoing_gradient**2 + 4
				lowerCAmelCase_ :      Tuple    				=				2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
				lowerCAmelCase_ :      List[Any]    				=				(point_y - outgoing_gradient * point_x) ** 2 - 100

				lowerCAmelCase_ :      List[str]    				=				(
				    -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term )
				) / (2 * quadratic_term)
				lowerCAmelCase_ :      Tuple    				=				(
				    -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term )
				) / (2 * quadratic_term)

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

				return next_x, next_y, outgoing_gradient



def 			lowerCAmelCase (		lowerCAmelCase_ = 1.4 ,   lowerCAmelCase_ = -9.6 )-> int:
				lowerCAmelCase_ :      int    				=				0
				lowerCAmelCase_ :      float    				=				first_x_coord
				lowerCAmelCase_ :      float    				=				first_y_coord
				lowerCAmelCase_ :      float    				=				(10.1 - point_y) / (0.0 - point_x)

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

				return num_reflections


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



import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, Features, Value
from .base import TaskTemplate







@dataclass(frozen=UpperCAmelCase__							)
class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  str					=							field(default="""automatic-speech-recognition""",						metadata={"""include_in_asdict_even_if_is_default""": True}							)
						SCREAMING_SNAKE_CASE__      :  ClassVar[Features]					=							Features({"""audio""": Audio()}							)
						SCREAMING_SNAKE_CASE__      :  ClassVar[Features]					=							Features({"""transcription""": Value("""string"""							)}							)
						SCREAMING_SNAKE_CASE__      :  str					=							"audio"
						SCREAMING_SNAKE_CASE__      :  str					=							"transcription"




						def 						lowercase_ (				self   ,						__lowercase							)					->    int:
										if self.audio_column not in features:
														raise ValueError(f"""Column {self.audio_column} is not present in features."""							)
										if not isinstance(features[self.audio_column]   ,						__lowercase							):
														raise ValueError(f"""Column {self.audio_column} is not an Audio type."""							)
										lowerCAmelCase_ :      List[str]    				=				copy.deepcopy(self							)
										lowerCAmelCase_ :      Optional[Any]    				=				self.input_schema.copy()
										lowerCAmelCase_ :      Optional[Any]    				=				features[self.audio_column]
										lowerCAmelCase_ :      List[str]    				=				input_schema
										return task_template




						@property
						def 						lowercase_ (				self							)					->    Dict[str, str]:
										return {self.audio_column: "audio", self.transcription_column: "transcription"}