Complete the @c family: @ch (half) and @cq (quad) complex, end to end#50
Merged
Conversation
Fills the two unimplemented slots in the @c aura family across all three layers.
/lib/complex: add the ch (2x@rh, 16-bit components) and cq (2x@rq, 128-bit
components) doors -- verbatim analogues of cs/cd over the rh/rq float doors --
with full per-arm doccords and complete test coverage (re/im/pak/zero/one/add/
sub/neg/conj/mul/div/abs/equ/neq). All example/test values captured from the
ship.
Lagoon %cplx: wire bloq 5 (ch) and bloq 8 (cq) into the eye/ones one-value and
the fun-scalar/trans-scalar dispatches (which previously handled only 6/7).
Element-wise add/sub/mul/div/abs/conj/equ/neq now work for all four widths;
lagoon-cplx tests gain ch/cq cases.
Saloon eig: generalize the component dispatch. cb-comp is now just (dec cb);
the scalar float helpers (fadd..feps, fsqt) cover component bloq 4/5/6/7
(rh/rs/rd/rq) and the complex helpers cover complex bloq 5/6/7/8 (ch/cs/cd/cq).
+eig-herm accepts %cplx bloq 5-8 and symmetric +eig accepts %i754 bloq 4-7, so
eigendecomposition now runs at half through quad precision. New
saloon-eigh-cc test verifies [[2,i],[-i,2]] -> {1,3} at @ch and @cq.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fills the two unimplemented slots in the
@caura family —@ch(half) and@cq(quad) — reserved in/lib/complex's header but never built. Now implemented end to end across all three layers, so the family is@ch / @cs / @cd / @cqeverywhere./lib/complexch(2×@rh, 16-bit components → 32-bit element) andcq(2×@rq, 128-bit → 256-bit) doors — verbatim analogues ofcs/cdover therh/rqfloat doors — with full per-arm doccords and complete test coverage (all 14 public arms). Every example/test value captured from the ship.%cplxch) / 8 (cq) intoeye/ones/fun-scalar/trans-scalar(previously 6/7 only). Element-wise add/sub/mul/div/abs/conj/equ/neq now work at all four widths;lagoon-cplxgains ch/cq cases.eigcb-compcollapses to(dec cb); the scalar-float helpers (fadd…feps,fsqt) cover component bloq 4–7 (rh/rs/rd/rq) and the complex helpers cover bloq 5–8 (ch/cs/cd/cq).eig-hermaccepts%cplx5–8 and symmetriceigaccepts%i7544–7.Eigendecomposition now runs at half through quad precision. New
saloon-eigh-cctest verifies the analytic case[[2,i],[−i,2]] → {1,3}at@chand@cq(NumPy can't emit true IEEE binary128, so the precision-independent case is used).Tests (all green on ~hex)
/tests/lib/complex: 16 cases — cs/cd/ch/cq × components/arith/unary/compare./tests/lib/lagoon-cplx: +test-cplx-ch, +test-cplx-cq./tests/lib/saloon-eigh-cc: half + quad Hermitian eig. Existing cs/cd eig unchanged.Depends on the merged doccord PR #49 (which established the
cddoccord/test template these ch/cq doors follow).🤖 Generated with Claude Code