A powerful calculator application with an interactive CLI
Project description
NexusCalc
A powerful calculator application with an interactive command-line interface.
Features
- ➕ Addition
- ➖ Subtraction
- ✖️ Multiplication
- ➗ Division with zero division error handling
- 🏠 Floor division
- 🔢 Mathematical constants (pi, e, tau)
- 📐 Advanced mathematical functions (sqrt, sin, cos, tan, log)
- 🛡️ Comprehensive error handling
- 💎 Clean number formatting
- 🎨 Colorful and interactive CLI
Installation
python -m pip install nexuscalc
Usage
Interactive Mode
from nexuscalc import nexuscalc
nexuscalc.calculate()
Or:
import nexuscalc
nexuscalc.nexuscalc.calculate()
Or after installation:
nexuscalc
Programmatic Usage
from nexuscalc.core.operations import Operations
ops = Operations()
result = ops.add(5, 3) # Returns 8
Advanced Expression Evaluation
from nexuscalc.evaluator.evaluator import Evaluator
eval = Evaluator()
result = eval.evaluate_expression("2 + 3 * 4") # Returns 14
Error Handling
NexusCalc includes comprehensive error handling for:
- Division by zero (with friendly error messages)
- Invalid input formats
- Numeric overflow
- Expression parsing errors
- Function evaluation errors
Development
Run tests:
python -m pytest tests/ -v
Run tests with coverage:
python -m pytest tests/ --cov=src/nexuscalc
Project Structure
nexuscalc/
├── src/nexuscalc/
│ ├── core/ # Core calculator logic
│ ├── parsers/ # Expression parsing
│ ├── evaluator/ # Expression evaluation
│ ├── utils/ # Utilities and helpers
│ └── exceptions/ # Custom exceptions
├── tests/ # Unit tests
├── examples/ # Usage examples
└── setup.py # Package setup
License
MIT
Author
Light Bulb Experiments © 2026
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nexuscalc-1.0.0.tar.gz
(11.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
nexuscalc-1.0.0-py3-none-any.whl
(13.9 kB
view details)
File details
Details for the file nexuscalc-1.0.0.tar.gz.
File metadata
- Download URL: nexuscalc-1.0.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28c235e61165089e1f05461b57e881c1544e1f1befe48ebbae288c750d7e455c
|
|
| MD5 |
907bc9e8a0946bd562bff4d77d058196
|
|
| BLAKE2b-256 |
b870207c6196a2d38a9b164aaa987083fd2bd30ed817626b70542c4d36b3b640
|
File details
Details for the file nexuscalc-1.0.0-py3-none-any.whl.
File metadata
- Download URL: nexuscalc-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1012bd02041e633375208c028641135fe981d6bc5237fafdc313aa555b6487b
|
|
| MD5 |
9b20953f32dedeb90a2294b545bd5f31
|
|
| BLAKE2b-256 |
f09183f179203b7bb557ea6a37bbbd540fc930241f56fd2a7c67718038b379c9
|