Skip to content
← Work

ries-rs

Find simple equations for a number.

Open-source toolRelease 3.0.0

Documented example

The solver opens in your browser; decimals and scientific notation work.

What it does

Give RIES a number and it searches for short equations with that number as a solution. For example, 2.506628274631 is approximately √(2π).

ries-rs is a Rust reimplementation of Robert P. Munafo’s original RIES.

What’s new in v3.0.0

  • Precision-aware discovery: keeps the decimal you entered and favors the simplest equation that explains its precision. For 1.41421356, discovery selects x = sqrt(2) and retains x^2 = 2 as a supporting equation.
  • A shared workflow: Rust, CLI, Python, and WASM return structured hypotheses, supporting equations, search settings, and explicit verification statuses.
  • More reliable search and exports: fixes missed expressions, stopping order, impossible composed-trig roots, decimal boundaries, and mathematical rendering. Browser results stay attached to their completed search after settings change.
  • Independent checks: external tools can bound supported polynomial roots with exact rational arithmetic. Unsupported checks remain explicit; a bounded root does not prove an intended constant equals it.

See the v3.0.0 release notes for details and Rust API migration guidance.

Benefits over original RIES

Original RIES established the search model, profiles, symbol customization, and restricted mathematical classes. This version builds on that foundation:

Benefit What you gain
Use one engine across environments CLI, Rust library, Python bindings, and browser/Node WASM packages.
Respect decimal precision Discovery prioritizes concise explanations consistent with the digits supplied.
Reproduce research Deterministic ordering, structured JSON, run manifests, and exact-bit replay checks.
Connect analysis tools Supporting equations and LaTeX, SymPy, and Mathematica exports.
Choose execution strategies Parallel generation, native turbo refinement, and streaming options for larger searches.
Inspect numerical evidence Optional high-precision reevaluation, unavailable-check statuses, and independent certificates for a restricted polynomial grammar.
Integrate and distribute A memory-safe, MIT-licensed Rust implementation, regression-tested APIs, cross-platform CI, prebuilt executables, and Python wheels.

Historical ordering can differ, and speed depends on the workload. Numerical matches remain conjectures to investigate.

Three numbers to investigate

These finite decimal values can admit other candidates; the examples invite mathematical investigation rather than establishing uniqueness.

Install

cargo install ries --version 3.0.0 --locked

The crates.io package is named ries; the installed command is ries-rs.

For Python, the distribution is ries-rs and the import is ries_rs; the release-matched Python guide covers installation and programmatic searches. Rust programs use the ries crate. The browser is a quick entry into the same numerical search.

What works today

  • Search from the browser, command line, Rust, or Python.
  • Preserve a rounded decimal as text with discover(), or use raw search() for the existing result format.
  • Choose a search complexity, restrict the available symbols, and use presets.
  • Copy equations, export discovery runs with their settings, and share a browser search by URL.
  • Run deterministic searches with structured JSON output and run manifests.
  • Use the optional native turbo mode to parallelize matching.

Limits

A numerical match is a candidate relation, not a proof of an identity. Results depend on the allowed symbols and search level.

The browser demo uses the selected release engine 3.0.0 in sequential mode. PSLQ and turbo are native-only. Use deterministic mode when repeatable result sets matter.

The performance writeup includes the benchmarks, ranking changes, failed parallel approach, and reproducibility contract.