https://github.com/bezlant/s21_math_solver
🧮 A simple math expression evaluator built wtih Imgui. (School 42)
https://github.com/bezlant/s21_math_solver
c calculator check djikstra-algorithm graph-visualization imgui-glfw math-solver parser rpn-calculator test-coverage
Last synced: about 19 hours ago
JSON representation
🧮 A simple math expression evaluator built wtih Imgui. (School 42)
- Host: GitHub
- URL: https://github.com/bezlant/s21_math_solver
- Owner: bezlant
- License: mit
- Created: 2022-05-27T13:24:52.000Z (almost 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-22T11:42:38.000Z (over 3 years ago)
- Last Synced: 2023-03-04T00:43:21.578Z (about 3 years ago)
- Topics: c, calculator, check, djikstra-algorithm, graph-visualization, imgui-glfw, math-solver, parser, rpn-calculator, test-coverage
- Language: C
- Homepage:
- Size: 12 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Math Solver
https://user-images.githubusercontent.com/89563512/185045399-0f98ad54-0580-4e1c-8b0b-f7a8d163ee23.mov
### Table of Contents
* [Introduction](#introduction)
* [Features](#features)
* [Goals](#goals)
* [Build & Dependencies](#build-and-dependencies)
* [Tests](#tests)
### Introduction
Implementation of the **math solver** in C following the principles of structured programming. In addition to basic arithmetic operations, the calculator features the *mathematical functions*, *x variable* and *graphing*.
### Features
FunctionsArithmetic Operators
| Function description | Function |
| ------ | ------ |
| Cosine | cos(x) |
| Sine | sin(x) |
| Tangent | tan(x) |
| Arc cosine | acos(x) |
| Arc sine | asin(x) |
| Arc tangent | atan(x) |
| Square root | sqrt(x) |
| Natural logarithm | ln(x) |
| Common logarithm | log(x) |
| Operator | Example |
| --------- | ------ |
| Brackets | (a + b) |
| Addition | a + b |
| Subtraction | a - b |
| Multiplication | a * b |
| Division | a / b |
| Power | a ^ b |
| Modulus | a mod b |
| Unary plus | +a |
| Unary minus | -a |
**BONUS**: You can find Credit & Debit calculators as well ;)
### Goals
- [x] Make & Imgui integration
- [x] GUI based on Dear ImGui
- [x] Integrate ImPlot
- [x] Shunting-Yard algorithm.
- [x] String validation algorithm.
- [x] Credit calculator
- [x] Debit calculator
- [x] Unit Tests
- [x] Add previews & tests to README
### Build and Dependencies
You'll need to install g++, pcre, make, pkg-config, glfw and doxygen(if you need the documentation).
```
$ git clone https://github.com/bezlant/s21_math_solver --recursive
$ cd s21_math_solver/src/
$ make
$ make -f test.mk (for tests)
```
### Tests
* Unit tests are implemented using [Check](https://libcheck.github.io/check/) & coverage report with [LCOV](https://github.com/linux-test-project/lcov)
https://user-images.githubusercontent.com/89563512/185045620-0e82268f-fa63-47df-99cc-abe3894ffb69.mov