Commit c0ee586
authored
[SYCL][libdevice] Keep sign bit of result for std::sin(-0) (#17440)
For input '-0', __spirv_ocl_sin returns +0 for float and returns -0 for
double, MSVC complex math implementation does depend on this, discarding
the signbit for sin(-0) will lead to some corner case failures in
exp(std::complex<float>) e2e tests. This patch is a workaround for the
issue.
---------
Signed-off-by: jinge90 <[email protected]>1 parent f1992a0 commit c0ee586
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
171 | 175 | | |
172 | 176 | | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| |||
0 commit comments