Minimalist CLI for math & cryptography exploration 🦊
Project description
FoxMath 🦊
Minimalist CLI for math & cryptography exploration.
One binary. Clean output. Zero footguns. Educational by design.
Built with curiosity — for students, tinkerers, and crypto/math enthusiasts.
Features
- Legendre symbol
- Euler/Hermann Machin-like π approximation
- Elliptic curve point addition (over finite fields), including named curves (secp256k1) with on-curve result validation
- Chinese Remainder Theorem solver (handles non-coprime moduli)
- Continued fraction expansion and convergents
- Symlink-friendly (foxmath-legendre, foxmath-pi, foxmath-ecadd, foxmath-crt, foxmath-cf)
- JSON output mode
- Coming soon: challenge mode
Installation
pip install foxmath
Or from source:
git clone https://github.com/Abhrankan-Chakrabarti/foxmath.git
cd foxmath
pip install -e .
Usage Examples
foxmath pi --terms 200
π ≈ 3.1415926535897932384626433832795028841971693993752 (200 terms)
foxmath legendre 5 17
Legendre (5/17) = -1
# Symlinks (optional)
foxmath-ecadd --x1 1 --y1 2 --x2 3 --y2 4 --p 17
Result point: (14, 2)
# Named curve (secp256k1) — computes 2G by default
foxmath ecadd --curve secp256k1
Result point: (89565891926547004231252920425935692360644145829622209833684329913297188986597, 12158399299693830322967808612713398636155367887041628176798871954788371653930)
✓ on curve
# Chinese Remainder Theorem
foxmath crt --r 2 3 2 --m 3 5 7
x ≡ 23 (mod 105)
# Continued fraction expansion + convergents
foxmath cf --num 355 --den 113
[3; 7, 16]
3/1
22/7
355/113
# JSON output
foxmath pi --terms 100 --json
{
"tool": "foxmath",
"command": "pi",
"terms": 100,
"approx": "3.1415926535897932384626433832795028841971693993752"
}
Why FoxMath?
Because math and cryptography are more fun when you can play with them instantly in the terminal — with the same reliability as FoxPipe and fox-vault.
Simple. Practical. Reliable.
License
MIT © Abhrankan Chakrabarti
Star if you find it useful! Issues and PRs welcome.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file foxmath-0.4.0.tar.gz.
File metadata
- Download URL: foxmath-0.4.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b9af58e499f1b529935d8b79be5698fa66765663fafd99c944d4ed606c43ab7
|
|
| MD5 |
dc6ba837cc08d6b6147623407030b8e3
|
|
| BLAKE2b-256 |
57c3fb2bb8604d9e5d7889f7bce1f3adc2f58569bcc798879408cbe3c4fddd57
|
File details
Details for the file foxmath-0.4.0-py3-none-any.whl.
File metadata
- Download URL: foxmath-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
591dcfbd6513c7965347e8ff3e1a3aa4c1f74affea4f4c5b40832396c251e718
|
|
| MD5 |
c823d67ad40a4fc28c51483fd1c81dbc
|
|
| BLAKE2b-256 |
1dcbd4a64c6ff3b81881557e2a478a82dbae974105db4333d0a86a3fe730d25d
|