A web interface for RIES (RILYBOT Inverse Equation Solver) by Robert Munafo.
This web application allows users to enter a numerical value and find mathematical equations that produce that value. For example, entering π (3.14159) will find equations like:
- x² = 10 - π (an identity involving π)
- x ln(x) = 1 (the value where x ln(x) equals 1)
- e^(x/2) = 4 (the value where e raised to x/2 equals 4)
RIES is particularly useful for mathematical research, identifying constants, and finding unexpected relationships between mathematical expressions.
- WebAssembly-powered RIES equation solver
- Responsive, React-based UI
- MathJax for beautiful mathematical formula display
- Support for a wide range of mathematical functions and constants
- Clone this repository
- Install dependencies with
npm install
- Run the development server with
npm run dev
- Open your browser to the URL shown in the terminal (usually http://localhost:3000)
npm run build
This will create a production-ready build in the dist
directory.
To run tests for the FORTH parser:
npm test
To rebuild the RIES WebAssembly module:
# Install and activate Emscripten
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
# Build the WASM module
emcc -O2 ries.c -o public/ries.js \
-s WASM=1 \
-s MODULARIZE=1 \
-s 'EXPORT_NAME="createRIESModule"' \
-s INVOKE_RUN=0 \
-s EXPORTED_FUNCTIONS='["_main"]' \
-s EXPORTED_RUNTIME_METHODS='["ccall","callMain"]' \
-s ALLOW_MEMORY_GROWTH=1 \
-lm
The application uses:
- WebAssembly: The core RIES algorithm is compiled to WebAssembly from C for performance
- FORTH Parser: A custom parser converts FORTH notation (used by RIES) to LaTeX
- React: The UI is built with React and React Query for state management
- MathJax: Mathematical equations are rendered using MathJax
/src/utils/forthParser.js
- FORTH parser for converting RIES output to LaTeX/src/components/
- React components for the UI/src/hooks/useRIESCalculation.js
- React hook for RIES calculations/public/ries.js
and/public/ries.wasm
- Compiled WebAssembly module
- RIES was created by Robert Munafo
- This web interface was developed by Thomas Ahle
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.