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 6, 2020 · 7 revisions

Welcome to the Calc wiki!

Switching Compilers

To compile this program from the source code, you will need to use a C++17 compiler. If you're trying to run the program and you get errors about something called any, then you're using an older compiler. Here's how to switch to a C++17 compiler in Visual Studio.

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