φ-Engine — Exact Black-Box Calculus for Executable Systems
φ-Engine is an analytic compiler that computes exact calculus of black-box callables by exploiting factorial taylor structure.
Differentiate and integrate any callable to hundreds of digits. No computational graph. No symbolic form. No grid. No Δx.
pip install phi-engine
Quick Demo
from phi_engine import PhiEngine
from mpmath import mp
mp.dps = 200
eng = PhiEngine()
f = lambda x: mp.cos(x * x)
result = eng.differentiate(f, mp.mpf("0.25"))
print("f'(0.25):", mp.nstr(result, 12))
# Abs error: ~1e-162
What It Does
| Callable ($\frac{d}{dx}$) | Order | Time | Correct Digits |
|---|---|---|---|
| GELU(x) | 1 | 183 ms | 1994 |
| GELU(x) | 3 | 195 ms | 1088 |
| 100-layer tanh(x) | 1 | 1.21 s | 1963 |
| 100-layer tanh(x) | 2 | 1.87 s | (no oracle exists) |
| sin(10¹⁰⁰·x²) | 1 | 14 ms | 1083 |
| e^x·sin(10⁶·x) | 10 | 43 ms | 109 |
All orders. Parallel execution. Hybrid CPU/GPU routing. Deterministic φ-certificates.
φ-Engine knows at runtime how much precision each taylor term needs and routes to devices accordingly.
Watch φ-Engine differentiate a 724k param TANH model and route terms to CUDA as necessary:
Hybrid Self-Aware Precision Routing Example
φ-Engine evaluates your callable at factorial-spaced points using exact rational moment laws. All Taylor terms up to a predetermined degree are annihilated exactly — not asymptotically. Precision grows superfactorially with depth, and the engine knows how much precision is needed per term.
Watch AI Try to break it:
Click here for more adversarial AI tests
Documentation
- WHITEPAPER.md — Full technical explanation
- examples/ — Runnable demos (differentiation, integration, loss landscape, hybrid CUDA, much more)
- LetterToCantor.pdf — Complete mathematical proof of the foundations that made φ-Engine possible
Capability Briefs
Licenses
GPLv3-or-later (code) · CC BY-SA 4.0 (documents). Open forever.
Contact
Alex B — mathsisbeautiful@proton.me
🩷 Support the Work (Optional)
If you'd like to support ongoing research:
- GitHub Sponsors: https://github.com/sponsors/Purrplexia
- ETH (MetaMask):
0x663D8288b4Aa6F3A72FF4FE67d1a7B080cD5097d - BTC (Electrum):
bc1q0ntv4zvpdprlxexvz20mf7ajdydmp9ke9ulgep
Metadata
Release files for phi-engine 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phi_engine-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for phi_engine-1.1.2-py3-none-any.whl |
Release files / phi_engine-1.1.2-py3-none-any.whl
| Download URL | phi_engine-1.1.2-py3-none-any.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
612aea8732c90cc5618d198ed75fb9ac4db3e746aa9d372da44589dff62017c0
|
|
BLAKE2b-256 checksum How to use checksums |
2ea03d412a760a53974ef72228bb0e74e3625c1996cff1da9b1e439539d4f2a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for phi-engine 1.1.2
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.