Select a file to view its exact on-chain source. Sorted README → gnomod → sources → tests.
Render(path string) string
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
# Fractions
Exact rational arithmetic, demoing the [`p/moul/x/daily/fraction`](/p/moul/x/daily/fraction/v0) library.
## A third, three times
`1/3 + 1/3 + 1/3` = **1**, exactly — not 0.9999…
As a decimal it is only ever an approximation: `0.3333333333`
## Arithmetic
| expression | result |
|---|---|
| `1/2 + 1/3` | `5/6` |
| `1/2 - 1/3` | `1/6` |
| `1/2 × 1/3` | `1/6` |
| `1/2 ÷ 1/3` | `3/2` |
## Exact comparison
`1/3` vs `33333/100000` — identical to five decimal places, yet the library still knows which is larger: **1/3 is greater**
> Comparison cross-multiplies, so it never takes a decimal detour. There are no floats here: on a chain, an answer that depends on rounding is a consensus bug.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.