Repository navigation
MathForge v0.8.0 - The speed release
Pre-releaseMathForge v0.8.0 is the speed release. Exact computation is many times cheaper, and an independent checker still confirms every answer before it is returned. The core remains pure Python with zero runtime dependencies.
Faster, with every check intact
| Call | Input | v0.7.0 | v0.8.0 | Faster |
|---|---|---|---|---|
mf.rref |
16 × 16 integer matrix | 117 ms | 306 µs | 383× |
mf.det |
8 × 8 integer matrix | 5.4 ms | 114 µs | 48× |
mf.real_roots |
x⁵ − 4x + 2 | 63 ms | 1.3 ms | 50× |
mf.factor |
x¹² − 1 | 21 ms | 1.1 ms | 20× |
mf.evaluate_algebraic |
x³ + 2x at x = ∛2 | 47 ms | 5.1 ms | 9.3× |
mf.factor_integer |
2³² + 1 | 2.1 ms | 55 µs | 37× |
mf.integer_gcd |
1071 and 462 | 238 µs | 2.8 µs | 85× |
mf.binomial |
C(100, 50) | 317 µs | 6.6 µs | 48× |
mf.complex_sqrt |
√(3 + 4i) | 2.7 ms | 32 µs | 84× |
mf.expectation |
Binomial(20, 1/3) | 2.1 ms | 222 µs | 9.3× |
mf.median |
101 integers | 15 ms | 35 µs | 427× |
mf.taylor |
sin(x)·eˣ to order 6 | 152 ms | 23 ms | 6.6× |
Medians of three alternating rounds of nine calls on one Windows machine with Python 3.14.6, with MathForge's result caches cleared before every call. Both versions check every answer they return. Timings depend on the machine and the input; they are not guarantees.
What's new
- Exact kernels with their own checkers: integer linear algebra, dense integer polynomials, an integer kernel for factorization and primality, and complex and quadratic-surd arithmetic. Separate checkers in
mathforge.certifyconfirm their answers without rerunning the producer: modular certificates, prime certificates, truncated power series and a counting certificate for medians. - A lean value path: a value function such as
mf.detcalls the kernel and its checker directly. Any call it does not handle takes the structured path, so values and errors stay the same. - A cheaper structured pipeline:
Rationalfast paths, an inline computation budget, andmathforge.operationsinspecting arguments, value and evidence once. Records and bytes are unchanged. - Area modules from one registry: lazily loaded modules such as
mf.ntheory,mf.linalgandmf.stats, generated with the rest of the API from a declarative operation registry. - Mathematical JSON v6: a packaged schema that rejects a crafted document in milliseconds, and a generic
Unevaluated(kind, request, reason)record for a request without a verified answer. - MCP area tools and
mathforge.catalog: 37 tools in total. The thirty v0.7 tools keep their names and input schemas, andmathforge.verifyaccepts JSON versions 1 through 6. - Continued fractions:
mf.ntheory.continued_fraction, the first v6 operation.
Compatibility
Python 3.11–3.14 and the dependency-free core remain. Every v0.7 operation keeps its name, signature and result. v1–v5 documents keep their bytes and get the same verdicts, except that some checks that ran out of budget in v0.7 now complete. Some inputs just past a resource limit may now succeed, never with a different value. Rational now uses slots, so vars() of one raises TypeError. MathForge 0.7 does not read v6 documents.
Known limitations
integer_gcd and integer_lcm on very large integers, from about 2,000 bits (RSA size) upward, remain comparatively slow, because every result carries an independently checked Bézout certificate. solve_system still uses the v0.7 structured pipeline and will be accelerated in a later version, as will solve on the smallest equations, where that pipeline's fixed cost dominates.
Install
MathForge is not published on PyPI. Install the wheel attached below:
python -m pip install https://github.com/U-C4N/MathForge/releases/download/v0.8.0/mathforge-0.8.0-py3-none-any.whlThe wheel and source distribution are built from the v0.8.0 tag; SHA-256 checksums are included. See the README, the user guide and the changelog.
Validation includes 1,262 automated tests, executable documentation, typing and layering checks, and isolated wheel and sdist installations. CI passed on Linux and Windows with Python 3.11–3.14, with distribution checks also passing on macOS/Python 3.14.