Skip to content

commonfns: fix signed-zero verification - #2806

Open
svenvh wants to merge 1 commit into
KhronosGroup:mainfrom
svenvh:commonfns-zero
Open

svenvh wants to merge 1 commit into
KhronosGroup:mainfrom
svenvh:commonfns-zero

Conversation

@svenvh

@svenvh svenvh commented Sep 10, 2026

Copy link
Copy Markdown
Member

Positive and negative zero compare equal in C++, which allowed results of 0 with the wrong sign to pass. Fix with sign-aware comparisons.

Also fix smoothstep diagnostics to report arguments in the official function signature order.

This is preparatory work for improving the test's input ranges.

[run-test: test_commonfns]

Comment thread test_conformance/commonfns/test_base.h Outdated
Positive and negative zero compare equal in C++, which allowed results
of 0 with the wrong sign to pass.  Fix with sign-aware comparisons.

Also fix smoothstep diagnostics to report arguments in the official
function signature order.

This is preparatory work for improving the test's input ranges.

[run-test: test_commonfns]

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants