We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01869a0 commit 2de1379Copy full SHA for 2de1379
sycl/source/half_type.cpp
@@ -66,7 +66,7 @@ static uint16_t float2Half(const float &Val) {
66
uint16_t Ret = 0;
67
Ret |= Sign;
68
Ret |= Exp16 << 10;
69
- Ret |= Frac16;
+ Ret += Frac16;// Add the carry bit from operation Frac16 += 1;
70
71
return Ret;
72
}
sycl/test/basic_tests/half_type.cpp
@@ -233,6 +233,8 @@ int main() {
233
assert(bitwise_comparison_fp16(0.0, 0));
234
// -0
235
assert(bitwise_comparison_fp16(-0.0, 32768));
236
+ // 1.9999f
237
+ assert(bitwise_comparison_fp16(1.9999f, 0x4000));
238
// nan
239
assert(bitwise_comparison_fp16(0.0 / 0.0, 32256));
240
assert(bitwise_comparison_fp16(-0.0 / 0.0, 32256));
0 commit comments