


'''simple docstring'''
from math import isclose, sqrt


def     a   (    __a				,      __a				,      __a       )						->			int:



					'''simple docstring'''






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

					UpperCamelCase__     :str							      =				(
					    -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term       )
					) / (2 * quadratic_term)
					UpperCamelCase__     :Optional[int]							      =				(
					    -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term       )
					) / (2 * quadratic_term)

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

					return next_x, next_y, outgoing_gradient


def     a   (    __a = 1.4				,      __a = -9.6       )						->			Optional[Any]:



					'''simple docstring'''






					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.0_1 <= point_x <= 0.0_1 and point_y > 0):
										UpperCamelCase__     :str							      =				next_point(__lowerCAmelCase				,      __lowerCAmelCase				,      __lowerCAmelCase       )
										num_reflections += 1

					return num_reflections


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



'''simple docstring'''
import json
import sys


def     a   (    __a				,      __a     )						->			str:



					'''simple docstring'''






					with open(__a				,      encoding='''utf-8'''     ) as f:
										UpperCamelCase__     :List[str]							      =				json.load(__a     )

					UpperCamelCase__     :int							      =				['''<details>''', '''<summary>Show updated benchmarks!</summary>''', ''' ''']

					for benchmark_name in sorted(__a     ):
										UpperCamelCase__     :Optional[Any]							      =				results[benchmark_name]

										UpperCamelCase__     :int							      =				benchmark_name.split('''/'''     )[-1]
										output_md.append(f'''### Benchmark: {benchmark_file_name}'''     )

										UpperCamelCase__     :List[str]							      =				'''| metric |'''
										UpperCamelCase__     :str							      =				'''|--------|'''
										UpperCamelCase__     :Union[str, Any]							      =				'''| new / old (diff) |'''
										for metric_name in sorted(__a     ):
															UpperCamelCase__     :List[Any]							      =				benchmark_res[metric_name]
															UpperCamelCase__     :Optional[int]							      =				metric_vals['''new''']
															UpperCamelCase__     :Any							      =				metric_vals.get('''old'''				,      __a     )
															UpperCamelCase__     :Optional[int]							      =				metric_vals.get('''diff'''				,      __a     )

															UpperCamelCase__     :List[str]							      =				f''' {new_val:f}''' if isinstance(__a				,      (int, float)     ) else '''None'''

															if old_val is not None:
																				val_str += f''' / {old_val:f}''' if isinstance(__a				,      (int, float)     ) else "None"
															if dif_val is not None:
																				val_str += f''' ({dif_val:f})''' if isinstance(__a				,      (int, float)     ) else "None"

															title += " " + metric_name + " |"
															lines += "---|"
															value += val_str + " |"

										output_md += [title, lines, value, " "]

					output_md.append('''</details>'''     )

					with open(__a				,      '''w'''				,      encoding='''utf-8'''     ) as f:
										f.writelines('''\n'''.join(__a     )     )


if __name__ == "__main__":
		__snake_case							   =  sys.argv[1]
		__snake_case							   =  sys.argv[2]

		format_json_to_md(input_json_file, output_md_file)