cp-advanced-calculator
v1.2.7
Published
Calculator for Calculus
Downloads
20
Readme
Advanced Command-Line Calculator
This is a professional, command-line-based symbolic calculator built with Node.js and TypeScript. It can perform calculus and algebraic operations, and is designed to be published as an NPM package.
Core Features
- Calculus:
- Compute derivatives of functions (e.g., find the derivative of
x^2 + 2x). - Compute indefinite integrals of functions (e.g., find the integral of
2x).
- Compute derivatives of functions (e.g., find the derivative of
- Algebra:
- Solve single-variable algebraic equations (e.g., solve
2x - 10 = 0forx).
- Solve single-variable algebraic equations (e.g., solve
- User Interface:
- An interactive command-line interface (CLI) that prompts the user for mathematical expressions and the desired operation.
Installation
To use the calculator, you can run it directly with npx, or you can install it globally using npm:
npm install -g cp-advanced-calculator@latestUsage
Running with NPX
The easiest way to use the calculator is with npx:
npx cp-advanced-calculator@latestRunning after Global Installation
If you installed the package globally, you can run it with this command:
cp-advanced-calculatorOnce started, the calculator will prompt you to enter two numbers and select an operation to perform.
Examples
- Differentiate:
x^2 + 2x->2*x + 2
- Integrate:
2x->x^2
- Solve:
2x - 10 = 0->[5]
Development
If you want to contribute to this project, you can clone the repository and install the dependencies:
git clone https://github.com/cr33p1ngp4ck3t/cp-simple-calculator.git
cd cp-simple-calculator
npm installTesting
To run the unit tests, use the following command:
npm testLicense
This project is licensed under the ISC License.
