MADOLA integrates mathematical notation, computation, documentation, and code generation within a single file. Itโs not another wheel โ itโs the hub connecting them all.
@h2{
Funciton to calculate ฯ Using the Leibniz Series
}
@gen_cpp
fn calcPi(n) {
sum := 0.0;
for i in 0...n{
sum := sum + ((-1)^i) / ((2*i)+1);
}
return sum * 4;
}
#include <cmath>
double calcPi(double n)
{
double sum = 0;
for (int i = 0; i <= n; i++) {
sum = (sum + (pow(-1, i) / ((2 * i) + 1)));
}
return (sum * 4);
}
from example import calcPi as calc;
x1 := calc(1000);
print(x1);
Write equations exactly as you would on paper. MADOLA understands standard mathematical notation natively.
Built-in documentation generation. Create HTML with LaTeX-style formatting and equations directly from your code.
WASM execution can be 5โ25ร faster than standard AST evaluation. Compile directly to C++ or WebAssembly.
Works on Windows, Linux, and macOS. Run locally or deploy to the web with native WASM support.
| Feature | MADOLA | LaTeX / Typst | Python / Julia | Mathcad |
|---|---|---|---|---|
| Mathematical Syntax | โ Native | โ Excellent | โ ๏ธ Library-based | โ Visual |
| Executable Code | โ Yes | โ Static | โ Yes | โ Yes |
| Web Export (WASM) | โ Native | โ ๏ธ Toolchain | โ ๏ธ Heavy | โ No |
| Open Source | โ Apache 2.0 | โ Yes | โ Yes | โ Proprietary |