
import numpy as np




def 				__SCREAMING_SNAKE_CASE  (						SCREAMING_SNAKE_CASE			: Optional[Any]     )	->		Optional[int]:
				__lowercase						,   __lowercase								=   a.shape
				__lowercase								=   min(SCREAMING_SNAKE_CASE       ,				SCREAMING_SNAKE_CASE     )
				__lowercase								=   np.eye(SCREAMING_SNAKE_CASE     )
				__lowercase								=   a.copy()

				for k in range(t - 1     ):
								# select a column of modified matrix A':
								__lowercase								=   r[k:, [k]]
								# construct first basis vector
								__lowercase								=   np.zeros_like(SCREAMING_SNAKE_CASE     )
								__lowercase								=   1.0
								# determine scaling factor
								__lowercase								=   np.linalg.norm(SCREAMING_SNAKE_CASE     )
								# construct vector v for Householder reflection
								__lowercase								=   x + np.sign(x[0]     ) * alpha * ea
								v /= np.linalg.norm(SCREAMING_SNAKE_CASE     )

								# construct the Householder matrix
								__lowercase								=   np.eye(m - k     ) - 2.0 * v @ v.T
								# pad with ones and zeros as necessary
								__lowercase								=   np.block([[np.eye(SCREAMING_SNAKE_CASE     ), np.zeros((k, m - k)     )], [np.zeros((m - k, k)     ), q_k]]     )

								__lowercase								=   q @ q_k.T
								__lowercase								=   q_k @ r

				return q, r


if __name__ == "__main__":
							import doctest

							doctest.testmod()







def 				__SCREAMING_SNAKE_CASE  (						SCREAMING_SNAKE_CASE			: Union[str, Any]       ,				SCREAMING_SNAKE_CASE			: Any     )	->		Tuple:
				# "Simpson Rule"
				# int(f) = delta_x/2 * (b-a)/3*(f1 + 4f2 + 2f_3 + ... + fn)
				__lowercase								=   (boundary[1] - boundary[0]) / steps
				__lowercase								=   boundary[0]
				__lowercase								=   boundary[1]
				__lowercase								=   make_points(SCREAMING_SNAKE_CASE       ,				SCREAMING_SNAKE_CASE       ,				SCREAMING_SNAKE_CASE     )
				__lowercase								=   0.0
				y += (h / 3.0) * f(SCREAMING_SNAKE_CASE     )
				__lowercase								=   2
				for i in x_i:
								y += (h / 3) * (4 - 2 * (cnt % 2)) * f(SCREAMING_SNAKE_CASE     )
								cnt += 1
				y += (h / 3.0) * f(SCREAMING_SNAKE_CASE     )
				return y




def 				__SCREAMING_SNAKE_CASE  (						SCREAMING_SNAKE_CASE			: List[Any]       ,				SCREAMING_SNAKE_CASE			: Dict       ,				SCREAMING_SNAKE_CASE			: int     )	->		Any:
				__lowercase								=   a + h
				while x < (b - h):
								yield x
								__lowercase								=   x + h




def 				__SCREAMING_SNAKE_CASE  (						SCREAMING_SNAKE_CASE			: Any     )	->		List[Any]:  # enter your function here
				__lowercase								=   (x - 0) * (x - 0)
				return y




def 				__SCREAMING_SNAKE_CASE  (						)	->		List[str]:
				__lowercase								=   0.0  # Lower bound of integration
				__lowercase								=   1.0  # Upper bound of integration
				__lowercase								=   10.0  # define number of steps or resolution
				__lowercase								=   [a, b]  # define boundary of integration
				__lowercase								=   method_a(SCREAMING_SNAKE_CASE       ,				SCREAMING_SNAKE_CASE     )
				print(F"""y = {y}"""     )


if __name__ == "__main__":
							main()





