GPU: preserve NaN and round normal ties to even in primitive::f32_to_half #335

Closed
github-bot wants to merge 1 commit from gh-pr/335/head into gh-pr/335/base
Owner

@⁠towiice on GitHub · 2026-11-24 23:34 UTC · original
towiice:fix/primitive-fp16-nan-and-ties-to-even → main · +53 −4 · 1 files · 1 commits · closed without merging

Summary

Fixes #245.

In \crates/victory-gpu/src/primitive.rs, \ 32_to_half\ previously checked \if exp >= 31 { return sign | 0x7c00; }\ without distinguishing an incoming \NaN\ (
aw_exp == 0xff && man != 0) from overflow/infinity, turning any \NaN\ produced during \F16\ rectangle corner expansion (\ 0 + v2 - v1, e.g. \inf - inf\ or an \

**@⁠towiice** on GitHub · 2026-11-24 23:34 UTC · [original](https://github.com/fxceless/victory-fork/pull/335) `towiice:fix/primitive-fp16-nan-and-ties-to-even` → `main` · +53 −4 · 1 files · 1 commits · closed without merging ### Summary Fixes #245. In \crates/victory-gpu/src/primitive.rs\, \ 32_to_half\ previously checked \if exp >= 31 { return sign | 0x7c00; }\ without distinguishing an incoming \NaN\ (\ aw_exp == 0xff && man != 0\) from overflow/infinity, turning any \NaN\ produced during \F16\ rectangle corner expansion (\ 0 + v2 - v1\, e.g. \inf - inf\ or an \
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:41:00 +00:00
github-bot closed this pull request 2026-11-26 03:41:00 +00:00
Author
Owner

@⁠towiice on GitHub · 2026-11-25 00:36 UTC · original

Closing: this duplicates my earlier #315 for #245, which I opened first and which has the fuller test and description. Sorry for the noise.

**@⁠towiice** on GitHub · 2026-11-25 00:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/335#issuecomment-7148697829) Closing: this duplicates my earlier #315 for #245, which I opened first and which has the fuller test and description. Sorry for the noise.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.