Skip to content

Conversation

@alsepkow
Copy link
Contributor

This PR fixes the floating point 'POSITIVE' sets to have values to avoid having a value which produces an out-of-range 16-bit int/uint values when testing ftou and ftoi. Specifically, 3424241.0, is UB as it is larger than uint16_t max.

Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Wondering if there's an assert that could have been added somewhere to catch cases like this for us?

@alsepkow alsepkow enabled auto-merge (squash) October 20, 2025 18:50
@alsepkow
Copy link
Contributor Author

LGTM

Wondering if there's an assert that could have been added somewhere to catch cases like this for us?

Thought about that and I'm not sure there is a good way to assert that. We could, but it just feels like it is adding too much verbosity.

@alsepkow alsepkow merged commit 9e1686f into microsoft:main Oct 20, 2025
13 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants