polish-notation-calculator
An implementation of a polish notation (PN) calculator in C++ that does not rely on Standard Libraries.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Keywords
Repository
An implementation of a polish notation (PN) calculator in C++ that does not rely on Standard Libraries.
Basic Info
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
Polish Notation Calculator
An implementation of a polish notation (PN)[^definition] calculator in C++ that does not rely on Standard Libraries.
Features
📥 Checks valid syntax of polish notation (PN) expressions
🔍 Analyzes the expressions with a regex process
🤔 Output result of PN expression and operational steps for solving it
🔁 Calculate endlessly (no need to execute the program each time)
Motivation
The main aim of this project was to recreate the behavior of linked lists in C++ from scratch.
In other words, not using Standard Libraries of C++.
Method
Flow
The user inputs a polish notation (PN) expression.
Then it is checked by a simple regular expressions system that:
- If invalid, asks for a new expression
- Otherwise, prompts the user: see result and operations?
- Finally, the user can input a new PN expression.
Technical details
Makes use of the stack memory model for the operations related to the linked lists. Where the last item in a linked list, is the first out of it (LIFO).
Applies concepts such as pointers and references in C++.
Modeled towards object-oriented programming.
Documentation
Note: Please read the instructions and suggestions displayed at the start.
Evaluate and calculate PN expressions:
+ * 8 -72.4 4
/ 8 + 6 * 3 2
Operators: addition (
+), subtraction (-), multiplication (*), division (/).Decimal numbers (dot as decimal separator) and negative numbers.
Caveats
PN expressions have a certain way to be declared algebraically. Please be sure of the syntax to avoid errors in execution.
Be aware that it's possible for the program to answer correctly to some wrong inputs. However, I plan to correct these kind of bugs in future updates. See Contribute.
As a precaution, the program does not break if the input is invalid.
Install
- Binaries are in pre-release.
Clone the repo:
git clone https://github.com/alejoriosm04/polish-notation-calculator.git
Contribute
You are welcome to submit issues or pull requests.
Authors
Alejandro Ríos developed the entire program.[^thanks]
License
Copyright 2022 Alejandro Ríos.
[^definition]: Wikipedia: "A mathematical notation in which operators precede their operands".
[^thanks]: Thanks to Luis M. Torres-Villegas for revising the README.
Owner
- Name: Alejandro Ríos Muñoz
- Login: alejoriosm04
- Kind: user
- Location: Colombia
- Company: @gruponovaeafit
- Twitter: alejoriosm04
- Repositories: 5
- Profile: https://github.com/alejoriosm04
Majoring in Computer Science @EAFIT🇨🇴
Citation (CITATION.cff)
cff-version: 1.2.0
title: Polish Notation Calculator
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Alejandro
family-names: Ríos Muñoz
affiliation: Universidad EAFIT
repository-code: >-
https://github.com/alejoriosm04/polish-notation-calculator
abstract: >-
A calculator that checks and reads multiple polish
notation expressions to make calculations.
keywords:
- C++
- Polish notation
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| alejoriosm04 | a****4@g****m | 17 |
| Luis M. Torres-Villegas | 1****t | 4 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 2 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- luismtorresv (1)