Metadata-Version: 2.4
Name: quadratic-solver-freeman
Version: 0.1.0
Summary: Solve quadratic equations using the quadratic formula and completing the square.
Author-email: Json Freeman <freeman@gmail.com>
Keywords: math,algebra,quadratic,solver
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# quadratic-solver-freeman

A Python package to solve quadratic equations (**ax² + bx + c = 0**) using two methods:

- **Quadratic Formula** — direct application of the formula
- **Completing the Square** — algebraic step-by-step method

Supports both real and complex roots.

---

## Installation

```bash
pip install quadratic-solver-freeman
```

## Usage

```python
from quadratic_solver_freeman import solve_by_formula, solve_by_completing_square

# Real roots: x² - 5x + 6 = 0
r1, r2 = solve_by_formula(1, -5, 6)
print(r1, r2)  # 3.0  2.0

# Repeated root: x² - 2x + 1 = 0
r1, r2 = solve_by_completing_square(1, -2, 1)
print(r1, r2)  # 1.0  1.0

# Complex roots: x² + x + 1 = 0
r1, r2 = solve_by_formula(1, 1, 1)
print(r1, r2)  # (-0.5+0.866j)  (-0.5-0.866j)
```

## Methods

| Function | Method |
|---|---|
| `solve_by_formula(a, b, c)` | Quadratic formula |
| `solve_by_completing_square(a, b, c)` | Completing the square |

Both return a tuple `(x1, x2)` and raise `ValueError` if `a = 0`.

---

## License

MIT
