[PR #1496] docs: one contract for v_div_fixup in design.md, matching the gfx1036 measurement (DOC-DIV-FIXUP-ROW) #1526

Open
opened 2026-11-26 20:21:33 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1496
Author: @levi2m
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: docs/div-fixup-row-consistency


📝 Commits (1)

  • e0106f3 docs: one contract for v_div_fixup in design.md, matching the gfx1036 measurement (DOC-DIV-FIXUP-ROW)

📊 Changes

2 files changed (+3 additions, -3 deletions)

View changed files

📝 docs/design.md (+1 -1)
📝 tests/semantic/test_alu_div_fixup.py (+2 -2)

📄 Description

Claimed in the coordination issue as: DOC-DIV-FIXUP-ROW (claim)
Depends on: none (follow-up to #1005, which fixed tools/f64_diff.py and left this row)
Fixes: none

What and why

The v_div_fixup_f16/v_div_fixup_f64 row in docs/design.md stated the rules twice. The first half (overflow at >= 16/>= 1024, underflow at <= -1075, quieted NaN sources, NaN(S0) keeping its payload) is the old model. The second half, which cites the gfx1036 measurement, is what the translator and tests/semantic/test_alu_div_fixup.py implement: no overflow cutoff, f64 underflow at <= -1076, sNaN unchanged under IEEE=0, NaN(S0) -> ±inf. This removes the stale half and keeps one rule set, with the NaN source order (S2 wins) stated once. The docstring of test_alu_div_fixup.py carried the same two stale lines and is brought in line. No behaviour changes.

Tested

  • python -I scripts/run_semantic_tests.py -p 'test_alu_div_fixup*.py' tests/semantic: 2 files, 11 tests, 0 failed.
  • python -I tests/test_docs_links.py, tests/test_docs_cli_flags.py, tests/test_text_write_line_endings.py: OK.
  • python -m pytest tests/test_docs_design_rows.py tests/test_design_contract_rows.py tests/test_f16_hw_words.py tests/test_values.py: 109 passed.
  • python -I scripts/check_no_game_data.py on both files: clean.

GPUs tested: n/a (docs and a test docstring only)
AI-assisted: yes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1496 **Author:** [@levi2m](https://github.com/levi2m) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs/div-fixup-row-consistency` --- ### 📝 Commits (1) - [`e0106f3`](https://github.com/ubiquitarianism/leonida/commit/e0106f3ba3c3bcec8bc1d7673edfdd5edd0bb94b) docs: one contract for v_div_fixup in design.md, matching the gfx1036 measurement (DOC-DIV-FIXUP-ROW) ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/design.md` (+1 -1) 📝 `tests/semantic/test_alu_div_fixup.py` (+2 -2) </details> ### 📄 Description Claimed in the coordination issue as: DOC-DIV-FIXUP-ROW ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7150359366)) Depends on: none (follow-up to #1005, which fixed `tools/f64_diff.py` and left this row) Fixes: none ### What and why The `v_div_fixup_f16`/`v_div_fixup_f64` row in `docs/design.md` stated the rules twice. The first half (overflow at `>= 16`/`>= 1024`, underflow at `<= -1075`, quieted NaN sources, `NaN(S0)` keeping its payload) is the old model. The second half, which cites the gfx1036 measurement, is what the translator and `tests/semantic/test_alu_div_fixup.py` implement: no overflow cutoff, f64 underflow at `<= -1076`, sNaN unchanged under `IEEE=0`, `NaN(S0)` -> `±inf`. This removes the stale half and keeps one rule set, with the NaN source order (`S2` wins) stated once. The docstring of `test_alu_div_fixup.py` carried the same two stale lines and is brought in line. No behaviour changes. ### Tested - `python -I scripts/run_semantic_tests.py -p 'test_alu_div_fixup*.py' tests/semantic`: 2 files, 11 tests, 0 failed. - `python -I tests/test_docs_links.py`, `tests/test_docs_cli_flags.py`, `tests/test_text_write_line_endings.py`: OK. - `python -m pytest tests/test_docs_design_rows.py tests/test_design_contract_rows.py tests/test_f16_hw_words.py tests/test_values.py`: 109 passed. - `python -I scripts/check_no_game_data.py` on both files: clean. GPUs tested: n/a (docs and a test docstring only) AI-assisted: yes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1526
No description provided.