Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 source realm

Package fractiondemo is a small gnoweb demo of the exact rational arithmetic provided by the [p/moul/x/daily/fraction...

Readme View source

Fractions

⚠️ Experimental — generated with no human supervision by the daily MCP pipeline to exercise gno tooling. Not audited. See r/moul/x/daily.


Shows thirds summing to exactly one, the four operations, and a comparison that a decimal detour would get wrong.

Demo of the p/moul/x/daily/fraction library — no arithmetic lives here. Stateless, so Render is deterministic.

The comparison is the interesting row: 1/3 and 33333/100000 agree to five decimal places, and the library still reports which is larger, because Cmp cross-multiplies instead of converting to decimal.

Built for gno 0.9.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

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

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package fractiondemo is a small gnoweb demo of the exact rational arithmetic provided by the p/moul/x/daily/fraction(/p/moul/x/daily/fraction/v0) library: it shows thirds summing to exactly one, and a comparison that a decimal detour would get wrong.

It contains no arithmetic of its own. Stateless, so Render is deterministic.

Functions 1

func Render

1func Render(path string) string
source

Render renders the demo for gnoweb.

Imports 2

Source Files 3