You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is, the correct result is just under 0x1.7dc5344149045p-2, SYCL-CTS generates a reference result of 0x1.7dc5344149042p-2 (~-2.9 ULP), we generate a result of 0x1.7dc5344149047p-2 (~+2.1 ULP). We are within 4 ULP of the mathematically correct result, which is what the CTS aims to check, so the sinpi reference result would need to be calculated with more accuracy to not reject this.
I could attempt to create a PR fixing sinpi specifically if so desired, but I suspect this is a bigger problem that applies to other functions as well. I am wondering if rather than re-implementing all the functions, an existing arbitrary-precision tool or library could be reused?
The text was updated successfully, but these errors were encountered:
Actually, I was wrong here, apologies. I neglected to take into account that 0.8783900046 is not exactly representable in double and redoing the calculation with the exact value, 0.87839000460000005165994707567733712494373321533203125, tells us that SYCL-CTS's reference result is right after all. We are in a range here where a 0.47 ULP difference in input causes a 2.7 ULP difference in output. I will make sure that our implementation gets fixed.
That said, I do still think the suggestion to use an existing arbitrary-precision library is a good one, because we do actually already know we have accuracy issues with some functions (sycl::mix, #835), and in general, we have no way of checking the correctness of the reference implementations.
SYCL-CTS shows an error when using DPC++ with our OpenCL implementation.
The value that causes this is the randomly generated input 0.8783900046.
Evaluation with an arbitrary precision tool (calc, https://github.com/lcn2/calc) tells us that the correct result is
That is, the correct result is just under 0x1.7dc5344149045p-2, SYCL-CTS generates a reference result of 0x1.7dc5344149042p-2 (~-2.9 ULP), we generate a result of 0x1.7dc5344149047p-2 (~+2.1 ULP). We are within 4 ULP of the mathematically correct result, which is what the CTS aims to check, so the
sinpi
reference result would need to be calculated with more accuracy to not reject this.I could attempt to create a PR fixing
sinpi
specifically if so desired, but I suspect this is a bigger problem that applies to other functions as well. I am wondering if rather than re-implementing all the functions, an existing arbitrary-precision tool or library could be reused?The text was updated successfully, but these errors were encountered: