/c-calculator

A math expression parser and evaluator

Primary LanguageCMIT LicenseMIT

C Calculator

A simple math expression parser and evaluator written in C.

Supports basic math expressions such as:

  • 1 + 1 = 2
  • 5^2 = 25
  • sqrt(7)^2 = 7
  • 1 + 2 * 2 ^ 3 = 17
  • (1+2)(2+3) = 15
  • 2pi/2pi = 1
  • sin(2pi/3) = 0.86...
  • sqrt(3)/2 = 0.86...
  • e^sin(pi/2) = 2.71...
  • (1 + 1/1000)^1000 = 2.71...

Todo:

  • More graceful error handling