

'''simple docstring'''







from collections.abc import Sequence
def  UpperCAmelCase__      ( UpperCAmelCase__,    UpperCAmelCase__			)     ->     float:
       return sum(c * (x**i) for i, c in enumerate(UpperCAmelCase__			)			)
def  UpperCAmelCase__      ( UpperCAmelCase__,    UpperCAmelCase__			)     ->     float:
       A_		   = 0.0
       for coeff in reversed(UpperCAmelCase__			):
              A_		   = result * x + coeff
       return result


if __name__ == "__main__":
      __lowerCamelCase						    =      (0.0, 0.0, 5.0, 9.3, 7.0)
      __lowerCamelCase						    =      10.0
      print(evaluate_poly(poly, x))
      print(horner(poly, x))



'''simple docstring'''







from __future__ import annotations

from typing import Any
def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       if not postfix_notation:
              return 0

       A_		   = {"""+""", """-""", """*""", """/"""}
       A_		   = []

       for token in postfix_notation:
              if token in operations:
                     A_   ,     A_		   = stack.pop(), stack.pop()
                     if token == "+":
                            stack.append(a + b			)
                     elif token == "-":
                            stack.append(a - b			)
                     elif token == "*":
                            stack.append(a * b			)
                     else:
                            if a * b < 0 and a % b != 0:
                                   stack.append(a // b + 1			)
                            else:
                                   stack.append(a // b			)
              else:
                     stack.append(int(UpperCAmelCase__			)			)

       return stack.pop()


if __name__ == "__main__":
      import doctest

      doctest.testmod()
