KhronosGroup / KhronosGroup/OpenCL-CTS

math_brute_force remquo test does not check additional requirement for defined 0 quo output for nan results

Open
#2,644 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
232
Forks
235
Avg merge
8d 7h
Merged PRs (30d)
18

Description

Under "7.5.1. Additional Requirements Beyond C99 TC2", it is specified that remquo has a defined 0 output for the quo out argument when the result is a nan.

`remquo(x, y, &_quo_) returns a NaN and 0 in quo if x is ±∞, or if y is 0 and the other argument is
non-NaN or if either argument is a NaN.`

The conformance test does not check this, and assumes this is an undefined result. The code has an explicitly wrong check and comment for[float](https://github.com/KhronosGroup/OpenCL-CTS/blob/4a923c074b2acbc0f2db18c0360de31acb6fdad6/test_conformance/math_brute_force/binary_two_results_i_float.cpp#L290), [double](https://github.com/KhronosGroup/OpenCL-CTS/blob/4a923c074b2acbc0f2db18c0360de31acb6fdad6/test_conformance/math_brute_force/binary_two_results_i_double.cpp#L291) and [half](https://github.com/KhronosGroup/OpenCL-CTS/blob/4a923c074b2acbc0f2db18c0360de31acb6fdad6/test_conformance/math_brute_force/binary_two_results_i_half.cpp#L281)

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the remquo checks and comments near the cited lines in test_conformance/math_brute_force/binary_two_results_i_float.cpp, binary_two_results_i_double.cpp, and binary_two_results_i_half.cpp. Run the affected math_brute_force conformance tests and update the checks so NaN results require a zero quo output for the specified cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.