






'''simple docstring'''





from collections.abc import Callable

__A				:				Dict					=		Callable[[float], float]  # type alias for a real -> real function






def  lowerCamelCase_  (     lowercase__					,  lowercase__					,  lowercase__					,  ):
 lowerCamelCase__	=  float(lowercase__)
 while True:
  try:
   lowerCamelCase__	=  prev_guess - function(lowercase__) / derivative(lowercase__)
  except ZeroDivisionError:
   raise ZeroDivisionError("Could not find root") from None
  if abs(prev_guess - next_guess) < 10**-5:
   return next_guess
  lowerCamelCase__	=  next_guess






def  lowerCamelCase_  (     lowercase__):
 return (x**3) - (2 * x) - 5






def  lowerCamelCase_  (     lowercase__):
 return 3 * (x**2) - 2


if __name__ == "__main__":
 print(newton(f, fa, 3))









'''simple docstring'''





from math import cos, sin






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	=  float(lowercase__)
 return [[scaling_factor * int(x == y) for x in range(2)] for y in range(2)]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 return [[c, -s], [s, c]]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 lowerCamelCase__	=  c * s
 return [[c * c, cs], [cs, s * s]]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 lowerCamelCase__	=  c * s
 return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(F"""    {scaling(5) = }""")
print(F"""  {rotation(45) = }""")
print(F"""{projection(45) = }""")
print(F"""{reflection(45) = }""")

