






def 							lowerCamelCase__ (       __lowerCamelCase     :	int						):
  __UpperCAmelCase				:      List[str]	 =    [1]

  __UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase				:      Any	 =    0, 0, 0
  __UpperCAmelCase				:      Any	 =    ugly_nums[ia] * 2
  __UpperCAmelCase				:      Optional[Any]	 =    ugly_nums[ia] * 3
  __UpperCAmelCase				:      List[Any]	 =    ugly_nums[ia] * 5

  for _ in range(1    ,						__lowerCamelCase						):
    __UpperCAmelCase				:      str	 =    min(__lowerCamelCase    ,						__lowerCamelCase    ,						__lowerCamelCase						)
    ugly_nums.append(__lowerCamelCase						)
    if next_num == next_a:
      ia += 1
      __UpperCAmelCase				:      Dict	 =    ugly_nums[ia] * 2
    if next_num == next_a:
      ia += 1
      __UpperCAmelCase				:      List[str]	 =    ugly_nums[ia] * 3
    if next_num == next_a:
      ia += 1
      __UpperCAmelCase				:      int	 =    ugly_nums[ia] * 5
  return ugly_nums[-1]


if __name__ == "__main__":
       from doctest import testmod

       testmod(verbose=True)
       print(f"""{ugly_numbers(200) = }""")



from sympy import diff, lambdify, symbols
from sympy.functions import *  # noqa: F403




def    lowerCAmelCase_  (		lowercase:				str	,       lowercase:				complex	,       lowercase:				str = "x"	,       lowercase:				float = 10**-10	,       lowercase:				int = 1	,       )     ->					complex:







 '''simple docstring'''
 _UpperCamelCase:  Any    						=			symbols(lowercase		)
 _UpperCamelCase:  str    						=			lambdify(lowercase	,       lowercase		)
 _UpperCamelCase:  str    						=			lambdify(lowercase	,       diff(lowercase	,       lowercase		)		)

 _UpperCamelCase:  Optional[int]    						=			starting_point

 while True:
  if diff_function(lowercase		) != 0:
   _UpperCamelCase:  int    						=			prev_guess - multiplicity * func(lowercase		) / diff_function(
       lowercase		)
  else:
   raise ZeroDivisionError('''Could not find root'''		) from None

  # Precision is checked by comparing the difference of consecutive guesses
  if abs(next_guess - prev_guess		) < precision:
   return next_guess

  _UpperCamelCase:  Any    						=			next_guess


# Let's Execute
if __name__ == "__main__":
  # Find root of trigonometric function
  # Find value of pi
  print(f"""The root of sin(x) = 0 is {newton_raphson('sin(x)', 2)}""")

  # Find root of polynomial
  # Find fourth Root of 5
  print(f"""The root of x**4 - 5 = 0 is {newton_raphson('x**4 -5', 0.4 +5J)}""")

  # Find value of e
  print(
      '''The root of log(y) - 1 = 0 is ''',
      f"""{newton_raphson('log(y) - 1', 2, variable='y')}""",
  )

  # Exponential Roots
  print(
      '''The root of exp(x) - 1 = 0 is''',
      f"""{newton_raphson('exp(x) - 1', 1_0, precision=0.0_0_5)}""",
  )

  # Find root of cos(x)
  print(f"""The root of cos(x) = 0 is {newton_raphson('cos(x)', 0)}""")