Skip to content

danny-cpp/string-to-string-calculator

Repository files navigation

string-to-string-calculator

string-input-string-output c++ calculator module

1. Introduction:

The package include the "calculator" module. Simply include "calcualtor.h" to use the "calculate" function.

2. Instruction:

Compile using the included Makefile (for Linux based) or any system builder. Function takes in a string argument and output a string argument. Calculator works for complex numbers. Below is the syntax code.

3. Table of function codes

function syntax code
+,-,*, / same 1,(1,2,3,4)
^ ^ 1,5
sin, cos, tan s(, c(, t( 3,(8,9,10)
asin, acos, atan as(, ac(, at( 3,(11,12,13)
natural log ln( 3,14
square root r( 3,15
negative _( 3,16

4. Acknowledgement:

Shunting Yard algorithm was inspired by Briliant.org (pseudocode) at https://brilliant.org/wiki/shunting-yard-algorithm/ . Project used codes and ideas from our own previous works.

Danh Nguyen

University of Alberta

Winter 2020

About

string-input-string-output c++ calculator module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published