






"""simple docstring"""



from __future__ import annotations

from pathlib import Path




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->int:
 return pointa[0] * pointa[1] - pointa[1] * pointa[0]




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->bool:
 UpperCAmelCase__ 						=				(xa, ya)
 UpperCAmelCase__ 						=				(xa - xa, ya - ya)
 UpperCAmelCase__ 						=				(xa - xa, ya - ya)
 UpperCAmelCase__ 						=				-vector_product(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			) / vector_product(
     _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)
 UpperCAmelCase__ 						=				+vector_product(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			) / vector_product(
     _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)

 return a > 0 and b > 0 and a + b < 1




def       snake_case__		(   _SCREAMING_SNAKE_CASE = "p102_triangles.txt"			)    ->int:
 UpperCAmelCase__ 						=				Path(_SCREAMING_SNAKE_CASE			).parent.joinpath(_SCREAMING_SNAKE_CASE			).read_text(encoding="""utf-8"""			)

 UpperCAmelCase__ 						=				[]
 for line in data.strip().split("""\n"""			):
  triangles.append([int(_SCREAMING_SNAKE_CASE			) for number in line.split(""","""			)]			)

 UpperCAmelCase__ 						=				0
 UpperCAmelCase__ 						=				42

 for triangle in triangles:
  ret += contains_origin(*_SCREAMING_SNAKE_CASE			)

 return ret


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











"""simple docstring"""



from math import exp




def       snake_case__		(   _SCREAMING_SNAKE_CASE			)    ->float:
 return 8 * x - 2 * exp(-x			)




def       snake_case__		(   _SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE			)    ->float:
 UpperCAmelCase__ 						=				lower_bound
 UpperCAmelCase__ 						=				upper_bound
 for _ in range(0       ,	_SCREAMING_SNAKE_CASE			):
  UpperCAmelCase__						,	UpperCAmelCase__ 						=				xa, xa - (f(_SCREAMING_SNAKE_CASE			) * (xa - xa)) / (f(_SCREAMING_SNAKE_CASE			) - f(_SCREAMING_SNAKE_CASE			))
 return xa


if __name__ == "__main__":
 print(F'''Example: {secant_method(1, 3, 2)}''')



