Realm

v0

gno.land/r/moul/x/daily/fractiondemo/v0

Render

Fractions

Exact rational arithmetic, demoing the p/moul/x/daily/fraction 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

expressionresult
1/2 + 1/35/6
1/2 - 1/31/6
1/2 × 1/31/6
1/2 ÷ 1/33/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.

Transactions

No indexed transactions for this realm yet.

Calls, deploys, and child packages in indexed history.

Call function

Calls stay disabled until vm/qfuncs lists this package. Delve only submits functions the chain publishes for gno.land/r/moul/x/daily/fractiondemo/v0.

Source (qfile)