






from collections.abc import Sequence
def      a_ (      _A      ,   _A = False  )			->			float:







				"""simple docstring"""
				if not arr:
								return 0

				snake_case__									=     0 if allow_empty_subarrays else float('-inf'  )
				snake_case__									=     0.0
				for num in arr:
								snake_case__									=     max(0 if allow_empty_subarrays else num      ,   curr_sum + num  )
								snake_case__									=     max(_A      ,   _A  )

				return max_sum


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

							testmod()

							__UpperCamelCase					:		Dict	  =						[-2, 1, -3, 4, -1, 2, 1, -5, 4]
							print(f'''{max_subarray_sum(nums) = }''')












from collections.abc import Sequence
def      a_ (      _A      ,   _A  )			->			float:







				"""simple docstring"""
				return sum(c * (x**i) for i, c in enumerate(_A  )  )
def      a_ (      _A      ,   _A  )			->			float:







				"""simple docstring"""
				snake_case__									=     0.0
				for coeff in reversed(_A  ):
								snake_case__									=     result * x + coeff
				return result


if __name__ == "__main__":
							__UpperCamelCase					:		str	  =						(0.0, 0.0, 5.0, 9.3, 7.0)
							__UpperCamelCase					:		Dict	  =						1_0.0
							print(evaluate_poly(poly, x))
							print(horner(poly, x))




