Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 35 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,42 @@ just examples # Run all examples
- Use `just changelog` to regenerate
- Use `just changelog-unreleased <version>` to prepend unreleased changes

### GitHub CLI (`gh`)

When using `gh` to view issues, PRs, or other GitHub objects:

- **ALWAYS** use `--json` with `| cat` to avoid pager and scope errors:

```bash
gh issue view 64 --repo acgetchell/la-stack --json title,body | cat
```

- To extract specific fields cleanly, combine `--json` with `--jq`:

```bash
gh issue view 64 --repo acgetchell/la-stack --json title,body --jq '.title + "\n" + .body' | cat
```

- **AVOID** plain `gh issue view N` — it may fail with `read:project`
scope errors or open a pager.

- For **arbitrary Markdown** (backticks, quotes, special characters) in
comments, prefer `--body-file -` with a heredoc:

```bash
gh issue comment 64 --repo acgetchell/la-stack --body-file - <<'EOF'
## Heading

Body with `backticks`, **bold**, and apostrophes that's safe.
EOF
```

### GitHub Issues

Use the `gh` CLI to read, create, and edit issues:

- **Read**: `gh issue view <number>` (or `--json title,body,labels,milestone` for structured data)
- **List**: `gh issue list` (add `--label enhancement`, `--milestone v0.3.0`, etc. to filter)
- **Read**: `gh issue view <number> --json title,body,labels,milestone | cat`
- **List**: `gh issue list --json number,title,labels --jq '.[] | "#\(.number) \(.title)"' | cat` (add `--label enhancement`, `--milestone v0.4.0`, etc. to filter)
- **Create**: `gh issue create --title "..." --body "..." --label enhancement --label rust`
- **Edit**: `gh issue edit <number> --add-label "..."`, `--milestone "..."`, `--title "..."`
- **Comment**: `gh issue comment <number> --body "..."`
Expand Down Expand Up @@ -205,8 +235,9 @@ When creating or updating issues:
- `src/lu.rs`: `Lu<const D: usize>` factorization with partial pivoting (`solve_vec`, `det`)
- `src/ldlt.rs`: `Ldlt<const D: usize>` factorization without pivoting for symmetric SPD/PSD matrices (`solve_vec`, `det`)
- `src/exact.rs`: exact arithmetic behind `features = ["exact"]`:
- Determinants: `det_exact()`, `det_exact_f64()`, `det_sign_exact()` via Bareiss in
`BigRational`; `det_sign_exact()` adds a Shewchuk-style f64 filter for fast sign resolution
- Determinants: `det_exact()`, `det_exact_f64()`, `det_sign_exact()` via integer-only
Bareiss in `BigInt` (`bareiss_det_int`); `det_sign_exact()` adds a Shewchuk-style
f64 filter for fast sign resolution
- Linear system solve: `solve_exact()`, `solve_exact_f64()` via Gaussian elimination
with first-non-zero pivoting in `BigRational`
- Rust tests are inline `#[cfg(test)]` modules in each `src/*.rs` file.
Expand Down
6 changes: 4 additions & 2 deletions REFERENCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ matrices, see [6].

### Exact determinant sign (adaptive-precision Bareiss)

`det_sign_exact()` uses a Shewchuk-style f64 error-bound filter [8] backed by exact Bareiss
elimination [7] in `BigRational`. See `src/exact.rs` for the full architecture description.
`det_sign_exact()` uses a Shewchuk-style f64 error-bound filter [8] backed by integer-only
Bareiss elimination [7] in `BigInt`. Each f64 entry is decomposed into `mantissa × 2^exponent`,
scaled to a common integer base, and eliminated without any `BigRational` or GCD overhead.
See `src/exact.rs` for the full architecture description.

## References

Expand Down
Loading
Loading