mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 23:49:02 +00:00
Permit half overflow within allowable ULP (#600)
* Permit half overflow within allowable ULP Modify the algorithm for calculating half precision ULP error so that it duplicates the behaviour of the single precision ULP algorithm, in regards to allowing overflow within the defined ULP error. In the case where the test value is infinity, but the reference is finite, pretend the test value is 63336.0 and calculate the ULP error against that. Encountered this while testing half precision `hypot()` in PR !529, for inputs `hypot(-48864.0, 43648.0)` which has reference `65519.755799`. With RTE rounding this only just rounds to `65504` as half, and returning INF is currently infinite ULP error. Using the leniency introduced by this change however the error is `~0.5` within the `2` ULP bounds defined by the spec. * Run clang-format over changes Code now conforms to style guidelines and allows `check-format.sh` to pass.
This commit is contained in:
@@ -95,7 +95,6 @@ extern cl_device_fp_config gDoubleCapabilities;
|
||||
|
||||
float Abs_Error( float test, double reference );
|
||||
float Ulp_Error( float test, double reference );
|
||||
//float Ulp_Error_Half( float test, double reference );
|
||||
float Bruteforce_Ulp_Error_Double( double test, long double reference );
|
||||
|
||||
uint64_t GetTime( void );
|
||||
|
||||
Reference in New Issue
Block a user