math
Deterministic math operations using SymPy - arithmetic, algebra, calculus, linear algebra, number theory, and statistics
View on GitHubTable of content
Deterministic math operations using SymPy - arithmetic, algebra, calculus, linear algebra, number theory, and statistics
Installation
npx claude-plugins install @ananddtyagi/cc-marketplace/math
Contents
Folders: skills
Files: README.md
Documentation
Deterministic mathematical computation using SymPy. All calculations use symbolic math—no LLM estimation or hallucination.
What It Does
Ensures mathematical accuracy by running actual computations instead of letting Claude guess:
| Category | Operations |
|---|---|
| Arithmetic | add, subtract, multiply, divide, mod, power, sqrt, abs, factorial |
| Algebra | simplify, expand, factor, solve equations, solve systems, substitute |
| Calculus | derivatives, partial derivatives, integrals, limits, Taylor series, summations |
| Linear Algebra | matrices, determinants, inverse, eigenvalues/eigenvectors, RREF |
| Trigonometry | simplify, expand, degree/radian conversion |
| Number Theory | GCD, LCM, prime factorization, primality test, nth prime, binomial coefficients |
| Statistics | mean, variance, standard deviation |
Examples
# Solve x² - 5x + 6 = 0
python math_calculator.py solve "x**2 - 5*x + 6" x
# → [2, 3]
# Derivative of x³ + sin(x)
python math_calculator.py derivative "x**3 + sin(x)" x
# → 3*x**2 + cos(x)
# Definite integral from 0 to 1
python math_calculator.py integrate "x**2" x 0 1
# → 1/3
# Prime factorization
python math_calculator.py prime_factors 360
# → 2³ × 3² × 5
# Matrix determinant
python math_calculator.py det '[[1,2],[3,4]]'
# → -2
Installation
Requirements
- Python 3.8+
- SymPy library
pip install sympy
Plugin Setup
- Clone or download this repository
- Install in Claude Code:
First add this marketplace to Claude Code:
/plugin marketplace add ananddtyagi/cc-marketplace
/plugin install math@cc-marketplace
Manual Skill Install (without plugin)
Copy the math folder to:
- Personal:
~/.claude/skills/math/ - Project:
.claude/skills/math/
Folder Structure
math/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ ├── SKILL.md
│ ├── scripts/
│ │ └── math_calculator.py
│ └── references/
│ └── api_reference.md
└── README.md
Usage
Once installed, Claude automatically invokes the skill when you ask math questions. Just ask naturally:
- “What’s the derivative of x³ + 2x?”
- “Solve x² - 4 = 0”
- “Factor x³ - 8”
- “What’s the integral of sin(x) from 0 to π?”
- “Is 97 prime?”
Included Skills
This plugin includes 1 skill definition:
SKILL
Deterministic mathematical computation using SymPy. Use for ANY math operation requiring exact/verified results - basic arithmetic, algebra (simplify, expand, factor, solve equations), calculus (derivatives, integrals, limits, series), linear algebra (matrices, determinants, eigenvalues), trigonometry, number theory (primes, GCD/LCM, factorization), and statistics. Ensures mathematical accuracy by using symbolic computation rather than LLM estimation.
View skill definition
Math Tools
Deterministic mathematical computation engine using SymPy. All calculations use symbolic math - no LLM estimation.
When to Use
Use this skill whenever mathematical accuracy matters:
- Arithmetic involving fractions, roots, or large numbers
- Algebraic simplification, expansion, factoring
- Solving equations (polynomial, transcendental, systems)
- Calculus (derivatives, integrals, limits, series)
- Linear algebra (matrices, eigenvalues, determinants)
- Number theory (primes, factorization, GCD/LCM)
- Statistical calculations
Quick Start
Run the calculator script with operation and arguments:
python scripts/math_calculator.py <operation> <args...>
All results return JSON with result, latex, and numeric fields.
Core Operations
Arithmetic
python scripts/math_calculator.py add 5 3 2 # 10
python scripts/math_calculator.py multiply 2 3 4 # 24
python scripts/math_calculator.py divide 10 4 # 5/2 (exact)
python scripts/math_calculator.py sqrt 8 # 2*sqrt(2)
python scripts/math_calculator.py factorial 10 # 3628800
Algebra
# Simplify
python scripts/math_calculator.py simplify "(x**2 - 1)/(x - 1)"
# → x + 1
# Expand
python scripts/math_calculator.py expand "(x + 1)**3"
# → x**3 + 3*x**2 + 3*x + 1
# Factor
python scripts/math_calculator.py factor "x**3 - 8"
# → (x - 2)*(x**2 + 2*x + 4)
# Solve equations
python scripts/math_calculator.py solve "x**2 - 5*x + 6" x
# → [2, 3]
pyth
...(truncated)
</details>
## Source
[View on GitHub](https://github.com/ananddtyagi/cc-marketplace)