Exact arithmetic. High-precision mathematics. One C17 core.
NumForge is a modular mathematics platform: a standalone C library, an expression engine, an experimental Python adapter, and CLI/browser applications. The interfaces reuse C implementations; mathematical operations work without a browser, application session or database.
Get started · Browser · C/C++ · Python · Documentation · Roadmap
| Capability in current source | Explore |
|---|---|
| Arbitrary-precision integers, decimals, fractions and complex numbers | Numeric APIs |
| Typed expressions, explicit precision and reusable parameterized expressions | Expression engine |
| Exact linear/quadratic equations, rational matrices and general linear systems | Supported APIs |
| Exact statistics, covariance and linear regression | Statistics |
| Exact grids, bounded root searches and approximate finite-interval integration | Numerical methods |
| Unit conversions and dimensional quantities | Units |
C/Python expose mathematical APIs beyond the browser tools. See interface coverage for availability.
| Calculator expression | Result |
|---|---|
0.1 + 0.2 |
0.3, exact |
2^128 |
340282366920938463463374607431768211456 |
1/3 + 1/6 |
1/2, exact reduced fraction |
sqrt(4/9) |
2/3, exact rational root |
convert(90; "km/h"; "m/s") |
25 |
qty(5; "m") * qty(5; "m") |
25 m² |
Use Full precision and Plain or Fraction notation as appropriate for these
exact results. For sqrt(2), choose Plain and 40 output places:
1.4142135623730950488016887242096980785697
Exact arithmetic stays exact within resource limits. Approximate calculations use explicit working precision; output places do not certify whole-expression accuracy. Numerical root discovery and graph sampling can miss roots or features.
The Slovak/English application combines a scientific calculator, unit converter, up to four function graphs, exact/numerical equation solving, variables and confirmed history. Arithmetic runs in C; JavaScript handles presentation and requests. No Node.js, Python or database is needed at runtime.
Real application captures, refreshed on 21 October 2026 from development source. Start with the calculator guide, graphs or equations.
For the newest features, build current source with CMake 3.21+ and a C17 compiler:
git clone https://github.com/Interacti0n/NumForge.git
cd NumForge
cmake --preset apps
cmake --build --preset appsRun numforge_web or calculator from build/apps/, or build/apps/Release/
with Visual Studio. Open http://127.0.0.1:8765 for the browser app.
Use --port N for another port and --no-browser to suppress browser launching.
Remote access is covered by Hosting. The HTTP server
currently processes connections serially; concurrent serving is in development.
Prefer a portable download? Get an application or SDK from Releases, verify its SHA-256 and extract the whole archive. Published 2.4.0 packages have an older API than current source and do not include Python. Check SDK compatibility before choosing a binary.
The numeric library and optional expression engine can be installed independently of the applications. Link the target your project needs:
find_package(NumForge CONFIG REQUIRED)
target_link_libraries(my_target PRIVATE NumForge::numforge)
# Use NumForge::engine when you also need expression parsing and evaluation.Follow C/C++ from source for installation and a complete C example, or the prebuilt SDK guide for archives. Installed headers define that package's API and ownership rules.
The experimental adapter is source-built with CPython 3.10+, its development headers, CMake and a C17 toolchain. In a virtual environment, from this checkout:
python -m pip install .from fractions import Fraction
import numforge as nf
assert nf.evaluate("1/3+1/6").as_fraction() == Fraction(1, 2)
assert nf.Matrix([[1, 2], [3, 4]]).determinant() == -2
fit = nf.linear_regression([1, 2, 3], [1, 2, 2])
assert (fit.slope, fit.intercept) == (Fraction(1, 2), Fraction(2, 3))
root = nf.sqrt(2, precision=1000) # 1000 working digits; approximate
assert not root.exact
area = nf.integrate(lambda x, places: x*x, 0, 1)
assert area.kind == "estimated" and area.value == Fraction(1, 3)
assert not area.exact # Numerical integration remains approximate.These operations call the C implementation. See Python
for prepared expressions, root searches, budgets and supported input types.
The adapter is not published to PyPI; pip install numforge is not the
installation command for this project.
The numeric core and modules own mathematical algorithms; the engine adds parsing and typed expression evaluation. Application state, HTTP and language adapters live in separate layers. See Architecture for the source map and Roadmap for the ordered next steps.
Benchmark tools and selected measurements include environments, verification and limits. Recorded timings describe their revision and machine; they are not current performance or server-capacity guarantees.
cmake --preset dev
cmake --build --preset dev
ctest --preset devThe first test configuration fetches Unity. Node.js enables additional checks; Playwright tests run separately. See Testing for focused checks, Python packages and installed C/C++ consumers.
Start with Contributing and the feature checklist. For a numerical issue, include input, precision, rounding, expected result and its independent reference.
Start here for user guides and integration paths. Changelog records user-visible changes; release verification records published artifact checks.
MIT. Copyright (c) 2026 Interacti0n.




