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
pip install quadratic-solver-freeman
Usage
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
Metadata
Release files for quadratic-solver-freeman 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quadratic_solver_freeman-0.1.0.tar.gz | 2.6 kB | Without provenance | Details for quadratic_solver_freeman-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quadratic_solver_freeman-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for quadratic_solver_freeman-0.1.0-py3-none-any.whl |
Total release size: 5.7 kB
Release files / quadratic_solver_freeman-0.1.0.tar.gz
| Download URL | quadratic_solver_freeman-0.1.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a2c708b9e5286ad349dd45b9078f3d394ada811b2b3bc16cebf37443eb1431c
|
|
BLAKE2b-256 checksum How to use checksums |
38d70a7a2148f6ccbd1e68e869e7b76c2b517b05003eb4174f6842fc71380c3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / quadratic_solver_freeman-0.1.0-py3-none-any.whl
| Download URL | quadratic_solver_freeman-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a34c54d4990b31719c2db7907f9f65656c8f8cd7daaf06a06a566841c1c6fe8c
|
|
BLAKE2b-256 checksum How to use checksums |
57cb9fc8528e5604d2146b52b37f97e1ea2ccc975e4e4b56aa8114f20596c3b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for quadratic-solver-freeman 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.