Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 9ceddd2

Browse files
committed
Add more testing to ensure the sign bit is also testedfor equivalency
1 parent 5659112 commit 9ceddd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SYCL/ESIMD/regression/fmod_compatibility_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ int test_fmod(float x, float y) {
6464

6565
float mod = std::fmod(ha, hb);
6666

67-
if (mod != out[0]) {
67+
if (mod != out[0] || std::signbit(mod) != std::signbit(out[0])) {
6868
std::cout << "Vector test failed for " << x << " and " << y << "."
6969
<< std::endl;
7070
return 1;
7171
}
7272

73-
if (mod != scalar_result) {
73+
if (mod != scalar_result || std::signbit(mod) != std::signbit(scalar_result)) {
7474
std::cout << "Scalar test failed for " << x << " and " << y << "."
7575
<< std::endl;
7676
return 1;

0 commit comments

Comments
 (0)