Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hitalom/euclides
Euclides is a simple calculator that performs arithmetic operations using only addition and subtraction.
https://github.com/hitalom/euclides
calculator euclidean polish-notation reverse-polish-notation rust
Last synced: 3 days ago
JSON representation
Euclides is a simple calculator that performs arithmetic operations using only addition and subtraction.
- Host: GitHub
- URL: https://github.com/hitalom/euclides
- Owner: HitaloM
- License: 0bsd
- Created: 2024-06-17T00:33:18.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-05T17:04:02.000Z (4 months ago)
- Last Synced: 2024-12-22T07:34:58.230Z (6 days ago)
- Topics: calculator, euclidean, polish-notation, reverse-polish-notation, rust
- Language: Rust
- Homepage:
- Size: 28.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Euclides
> A Rust-based conceptual calculator designed to explore the fundamentals of the language.
Euclides is a simple calculator that performs arithmetic operations using only addition and subtraction. It supports complex expressions and evaluates them using [Reverse Polish Notation](https://en.wikipedia.org/wiki/Reverse_Polish_notation) (postfix notation), along with infix and prefix notations.
## Features
- **Basic Operations**: Addition, Subtraction, Multiplication, and Division.
- **Notation Support**: Infix, Prefix, and Postfix notations.
- **Expression Evaluation**: Computes results for given expressions.## Usage
To use Euclides, run the program and input an expression in one of the supported notations. Specify the notation by prefixing your input with `prefix:`, `postfix:`, or `infix:`.
### Examples
1. **Infix Notation**:
```bash
$ infix: 3 + 4 * 2 / ( 1 - 5 )
```2. **Prefix Notation**:
```bash
$ prefix: + 3 / * 4 2 - 1 5
```3. **Postfix Notation**:
```bash
$ postfix: 3 4 2 * 1 5 - / +
```## Roadmap
- [x] Implement basic operations
- [x] Support infix, prefix, and postfix notations
- [ ] Add support for advanced/complex operations
- [ ] Develop a graphical user interface (GUI)## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
## License
This project is licensed under the [BSD Zero Clause](LICENSE) License.