RPN Calculator - Back-end Java REST Web Service

Instructions: enter a valid RPN expression. The following operators are supported:
  • Arithmetic operators: + * - /
  • Trigonometric operators: SIN, COS, TAN, COT
  • SQRT (square root) and SQR (square)
  • ^ is the power operator
  • MAX (max. of all elements)
  • MAX2 (max. of last 2 elements)
  • Read more about Reverse Polish Notation
Examples:
  • -3 2 + returns the sum of -3 and 2 : -1
  • 9 SQRT returns the square root of 9: 3
  • 3 5 8 * 7 + * returns 41
  • 5 3 4 2 9 1 MAX returns max value of the list: 9
  • 2 3 ^ returns 2 to the power of 2: 8
  • 90 SIN returns the sinus of 90


© UpAndCoding.com, 2020