Skip to content

docs+: P3 transparency cleanup (round-bankers, rd.log(-inf), stale docs)#54

Merged
sigilante merged 1 commit into
mainfrom
sigilante/doc-cleanup-p3
Jun 8, 2026
Merged

docs+: P3 transparency cleanup (round-bankers, rd.log(-inf), stale docs)#54
sigilante merged 1 commit into
mainfrom
sigilante/doc-cleanup-p3

Conversation

@sigilante

Copy link
Copy Markdown
Collaborator

P3 — docs/traceability batch (Gnome/Angel review)

Mostly comments/docstrings/READMEs, plus two trivial correctness one-liners with tests.

Behavioral (with tests) — math.hoon

  • round-bankers now actually rounds half-to-even. It was half-up: it took the already-toi-rounded value and bumped ties up, so round-bankers(2.5) → 3 (not 2). toi under %n ties to even, so force ^rs/^rd %n. → test-round-bankers (2.5→2, 1.5→2, 3.5→4).
  • rd.log(-inf) returns NaN (was 0.0 — a copy-paste from exp; rs.log was already correct). Also fixed the stray exp(...) comments in the rd.log branch. → test-log-ninf.

Docs / comments

  • math.hoon tiny (rs/rh): docstring/example said "smallest normal" but the value is the smallest subnormal (2^-149 / 2^-24) — corrected, with a pointer to the normal.
  • sur/lagoon.hoon: %cplx listed @cs/@cd → now @ch/@cs/@cd/@cq; augmented the tail=* comment to explain it's deliberate per-kind specialization space (slots in without rewriting jet axes — per the design rationale; %fixp uses it for precision).
  • lagoon.hoon: documented +check (the 0x1-pin / prod(shape) invariant every public arm relies on) and the known %i754→%uint negative-value limitation (was a bare XXX).
  • saloon.hoon: +neq doccord said "equal to" → "not equal to"; fixed the data=data= typos in the gth/gte/geq examples.
  • READMEs: lagoon Type System refreshed (%real%i754; all six kinds shipped, not "planned"); saloon gains a linear-algebra (eig/eigvals/eigvecs) section.

All edits are in regions disjoint from the open PRs (#50#53), so no conflicts expected. math.hoon, lagoon.hoon, saloon.hoon all rebuild green; the new math-rounding tests pass.

(Deferred to the #18 Chebyshev rewrite, already noted there: the log hang, exp cancellation, asin/acos & sqt(-0) crashes, and the no-op NaN guards.)

🤖 Generated with Claude Code

Doc/comment fixes plus two trivial correctness one-liners (with tests):

math.hoon:
 - round-bankers actually rounds half-to-EVEN now (was half-up: it took the
   already-rounded toi result and bumped ties up, so round-bankers 2.5 -> 3).
   toi under %n ties to even, so force ^rs/^rd %n.  +test-round-bankers.
 - rd.log(-inf) returns NaN (was 0.0 -- a copy-paste from exp; rs was already
   correct).  Fixed the stray "exp(...)" comments in the rd.log branch.
   +test-log-ninf.
 - tiny (rs/rh) docstrings/examples said "smallest normal" but the value is the
   smallest SUBNORMAL (2^-149 / 2^-24); corrected, with a pointer to the normal.

sur/lagoon.hoon:
 - %cplx comment listed @cs/@cd; four widths ship (@ch/@cs/@cd/@cq).
 - augmented the `tail=*` comment to explain it's deliberate per-kind
   specialization space (slots in without rewriting jet axes; %fixp uses it).

lagoon.hoon: documented +check (the 0x1-pin / shape invariant) and the known
%i754->%uint negative-value limitation (was a bare XXX).

saloon.hoon: +neq doccord said "equal to" -> "not equal to"; fixed the
`data=data=` typos in the gth/gte/geq examples.

READMEs: lagoon Type System refreshed (%real -> %i754; all six kinds shipped,
not "planned"); saloon README gains a linear-algebra (eig/eigvals/eigvecs)
section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sigilante sigilante force-pushed the sigilante/doc-cleanup-p3 branch from ed46f64 to ca42387 Compare June 8, 2026 17:51
@sigilante sigilante merged commit 1f0333c into main Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant