diff --git a/src/c/predicate.d b/src/c/predicate.d index a14216845..87eb68f3b 100644 --- a/src/c/predicate.d +++ b/src/c/predicate.d @@ -258,7 +258,7 @@ cl_eq(cl_object x, cl_object y) #define FLOAT_EQL(name, type) \ static bool name(type a, type b) { \ if (a == b) return signbit(a) == signbit(b); \ - if (isnan(a) || isnan(b)) return !memcmp(&a, &b, sizeof(type)); \ + if (isnan(a) || isnan(b)) return isnan(a) && isnan(b); \ return 0; \ } #endif