Skip to content

fix(riscv): keep directed FP rounding residuals exact - #333

Open
carlosqwqqwq wants to merge 1 commit into
HexRaysSA:masterfrom
carlosqwqqwq:fix-riscv-fp-directed-rounding
Open

fix(riscv): keep directed FP rounding residuals exact#333
carlosqwqqwq wants to merge 1 commit into
HexRaysSA:masterfrom
carlosqwqqwq:fix-riscv-fp-directed-rounding

Conversation

@carlosqwqqwq

@carlosqwqqwq carlosqwqqwq commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

fix(riscv): keep directed FP rounding residuals exact

Summary

Order the operands by magnitude before the Fast2Sum residual calculation so
the correction remains finite at max-finite top-binade midpoints. Add f32 and
f64 regression coverage for the directed and nearest rounding results.

Validation

  • Base: 7f162b19aeaa47825c82fb1c77ca042f535124e3.
  • git apply --check on the exact isolated base: passed.
  • git diff --check: passed.
  • Isolated exact RISC-V harness: cargo test --lib -- --nocapture — 181 passed,
    including both midpoint rounding tests.
  • Full RAX 7f source archive with all four prepared patches: cargo test --lib
    8601 passed, 0 failed, 2 ignored.
  • Remote Linux, cross-build, and rustfmt/clippy checks passed. The shared
    build + boot job currently fails before reaching RAX code in
    microkernel/src/arch.rs because this runner's Rust/LLVM rejects existing
    sse/avx/avx2/avx512f target features; the exact-base Microkernel run passed.

Closes #330

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.

Directed fadd rounding is off by one ulp at a max-finite midpoint

1 participant