Skip to content

HFP: IEEE <-> HFP conversion model for COMP-1/COMP-2 (Part of #4271) - #5708

Merged
squid-protocol merged 1 commit into
mainfrom
churn/4271-20261020T0814Z
Oct 20, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/4271-20261020T0814Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4271

Checklist: partial [c:ff93cc35] -- IEEE conversion model added; the proof against captured z/OS outputs waits on #4050 (no zos-run record exists)

What

det/hfp.py gains ieee_value, from_ieee, to_ieee, exact_in_both: binary32/64 <-> HFP short/long.

  • binary64 -> long HFP is exact; short HFP in binary32's normal range is exact; long HFP -> binary64 rounds half to even.
  • binary32 -> short HFP uses the fixed-point-to-float rule (ASSUMED: IBM documents no IEEE converter).
  • NaN, infinity, subnormals and out-of-range values are refused by name (HfpRange).
  • exact_in_both is register C6's "agrees with the oracle only for values exact in both formats".
  • Not used by the runtime: no Java, translator-output or golden change.

Tests: tests/cobol_mainframe/test_hfp_ieee.py (IBM vectors, seeded round-trip and nearest-float sweeps, range/special refusals). Register C6 documents the model.

Sibling gaps

Gates

Targeted pytest (53 pass), plain pytest from another cwd, audit_check.py clear, pr_gates --fast 6/6.

Lessons for agents

audit_check.py needs the venv's bin on PATH (it shells out to mypy).

🤖 Generated with Claude Code

)

Adds ieee_value, from_ieee, to_ieee and exact_in_both to det/hfp.py with
test_hfp_ieee.py, and documents the model in register C6. No zos-run capture
exists, so the proof against captured z/OS outputs still waits on #4050.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 20, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 20, 2026 08:21
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 20, 2026 08:22
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant