The result of abs(INT_MIN) is INT_MIN, which breaks the ulps comparison.
See also: https://gitlab.winehq.org/wine/vkd3d/-/commit/69ecfdfb
From: Jeff Smith whydoubt@gmail.com
The result of abs(INT_MIN) is INT_MIN, which breaks the ulps comparison. --- dlls/d2d1/tests/d2d1.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 6e2b3bb622a..c1833a6452d 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -731,10 +731,7 @@ static BOOL compare_float(float f, float g, unsigned int ulps) if (y < 0) y = INT_MIN - y;
- if (abs(x - y) > ulps) - return FALSE; - - return TRUE; + return compare_uint(x, y, ulps); }
static BOOL compare_colour_f(const D2D1_COLOR_F *colour, float r, float g, float b, float a, unsigned int ulps)