





"""simple docstring"""





def 				lowerCAmelCase_			(      SCREAMING_SNAKE_CASE       :							list    ,						SCREAMING_SNAKE_CASE       :							list    ,						SCREAMING_SNAKE_CASE       :							int   ):


							'''simple docstring'''







							__lowerCamelCase      :      Optional[Any]         =len(SCREAMING_SNAKE_CASE   )
							__lowerCamelCase      :      Union[str, Any]         =[[0] * n for i in range(SCREAMING_SNAKE_CASE   )]
							for i in range(SCREAMING_SNAKE_CASE   ):
														__lowerCamelCase      :      Union[str, Any]         =y_points[i]

							for i in range(2    ,						SCREAMING_SNAKE_CASE   ):
														for j in range(SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE   ):
																					__lowerCamelCase      :      List[Any]         =(
																					    (xa - x_points[j - i + 1]) * q[j][i - 1]
																					    - (xa - x_points[j]) * q[j - 1][i - 1]
																					) / (x_points[j] - x_points[j - i + 1])

							return [q[n - 1][n - 1], q]


if __name__ == "__main__":
							import doctest

							doctest.testmod()











"""simple docstring"""





def 				lowerCAmelCase_			(      SCREAMING_SNAKE_CASE       :							list    ,						SCREAMING_SNAKE_CASE       :							list    ,						SCREAMING_SNAKE_CASE       :							int   ):


							'''simple docstring'''







							__lowerCamelCase      :      Optional[Any]         =len(SCREAMING_SNAKE_CASE   )
							__lowerCamelCase      :      Union[str, Any]         =[[0] * n for i in range(SCREAMING_SNAKE_CASE   )]
							for i in range(SCREAMING_SNAKE_CASE   ):
														__lowerCamelCase      :      Union[str, Any]         =y_points[i]

							for i in range(2    ,						SCREAMING_SNAKE_CASE   ):
														for j in range(SCREAMING_SNAKE_CASE    ,						SCREAMING_SNAKE_CASE   ):
																					__lowerCamelCase      :      List[Any]         =(
																					    (xa - x_points[j - i + 1]) * q[j][i - 1]
																					    - (xa - x_points[j]) * q[j - 1][i - 1]
																					) / (x_points[j] - x_points[j - i + 1])

							return [q[n - 1][n - 1], q]


if __name__ == "__main__":
							import doctest

							doctest.testmod()




