Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 2.13 KB

README.md

File metadata and controls

70 lines (47 loc) · 2.13 KB

BC

DSA-I mini project

BC is an arbitrary precision calculator written in C, inspired by the GNU bc.
Note: Currently, it is using a workaround for parsing. You can perform only one operation at a time.

Prerequisites

  • GCC-11
  • CMake (>=3.19)

Usage

For building the project for the first time.

mkdir <directory_name>
cd <directory_name>
cmake ..

Then for further builds, use make in the directory created in the previous step. Refer this demo, if required.

Operations supported

+ Addition % Modulo
- Subtraction ** Exponentiation
* Multiplication << Shift Left
/ Division >> Shift Right

Data structures

Digit Number
Digit Number
node_N stack_N
node_N stack_N
node_C stack_C
node_C stack_C
Pair token
Pair token

Future plans/updates

  • Convert given infix expression to postfix notation to ease the task of parsing and evaluating.
  • Optimising multiplication by implementing it using Karatsuba algorithm.
  • Rewrite the whole project in C++, to add some additional features which can take the help of the OOP concepts.
  • Use 'binary tree' data structure for expression evaluation.

Mentor

Asst. Prof. Shrida Kalamkar

References