Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.
Chris Wheeler edited this page Mar 25, 2020 · 7 revisions

Welcome to the Calc wiki!

Here's how the files in this program should probably be organized once design patterns are used.

Order of Operations

PEMDAS is a helpful guide for learning the order of operations, but is not precise enough for a computer. Here's this program's order of operations:

  1. Operators within parentheses
  2. Factorial
  3. Exponent*
  4. Negation
  5. Multiplication and Division
  6. Addition and Subtraction
  7. Modulo
  8. Equality and Inequality
  9. Assignment

*Unlike the other operators, the exponent operator's precedence with itself is from right to left, e.g. 2^3^4 = 2^(3^4).

Clone this wiki locally