https://github.com/shadowfaxx1/equation-equivalence-checker
used shunting yard algo to check the equivalence of 2 equations
https://github.com/shadowfaxx1/equation-equivalence-checker
Last synced: 2 months ago
JSON representation
used shunting yard algo to check the equivalence of 2 equations
- Host: GitHub
- URL: https://github.com/shadowfaxx1/equation-equivalence-checker
- Owner: shadowfaxx1
- License: mit
- Created: 2022-06-25T22:42:18.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-13T08:04:14.000Z (almost 2 years ago)
- Last Synced: 2025-01-26T08:41:45.619Z (4 months ago)
- Language: C++
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🛡️ Equation Equivalence Checker
> The Equation Equivalence Checker is a Python program that utilizes the Shunting Yard algorithm to compare the equivalence of two mathematical equations. This tool is designed to handle expressions containing operations such as addition, subtraction, multiplication, division, and exponentiation, along with variables ('x' and 'y') and numbers.
## Features
- **Equation Comparison**: The program takes two equations as input and determines whether they are equivalent or not. It evaluates the expressions and performs a comparison based on their simplified forms.
- **Expression Evaluation**: The Equivalence Checker supports the evaluation of complex expressions, including variables and constants. It handles mathematical operations accurately and efficiently.
- **Constant Evaluation**: The program automatically evaluates constants in the expressions. For example, if an expression contains "4x + 3 - 2", it simplifies it to "4x + 1".
- **Input from File**: The program reads input equations from a file named "test_cases.txt". Users can add or modify equations in this file to compare different expressions.
- **Output to File**: The Equivalence Checker dynamically generates an output file named "equivalence_results.txt". The results of equation comparisons are written to this file for easy reference and analysis.
- **Bug Fixes**: Version 1.1 of the program includes bug fixes that address errors and uncertainties in the output. These fixes enhance the accuracy and reliability of the equation equivalence checking process.
## Usage
1. Ensure that the "test_cases.txt" file contains the equations you want to compare. Each equation should be on a separate line.
2. Run the program and wait for it to process the equations.
3. Once the program finishes executing, open the "equivalence_results.txt" file to view the results. The file will contain the equivalence status (equivalent or not equivalent) for each equation pair.
4. Analyze the results and use them to validate the equivalence of the equations.
## Contributions
Contributions and feedback are highly appreciated. If you encounter any issues or have suggestions for improvement, please feel free to raise an issue or submit a pull request on the project's GitHub repository.
Let's simplify the process of equation equivalence checking with the Equation Equivalence Checker!