From df611cf96495e8770e3391bb5727adc35e54ec8e Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sun, 24 Mar 2024 13:25:43 +0300 Subject: [PATCH] opt_int_div.h: use operator `!=` instead of `^` --- c-programming/math/opt_int_div.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-programming/math/opt_int_div.h b/c-programming/math/opt_int_div.h index 0484269..71031b9 100644 --- a/c-programming/math/opt_int_div.h +++ b/c-programming/math/opt_int_div.h @@ -23,7 +23,7 @@ #define INT_BIN_DIV(a, b) ((a) >> (uintmax_t) log2l((b))) #define INT_DIV_NEG_RESULT_SIGN(a, b) \ /* the sign is negative only if one of the numbers is negative */ \ - (((a) < 0) ^ ((b) < 0)) /* 1 if sign is negative else 0 */ + (((a) < 0) != ((b) < 0)) /* 1 if sign is negative else 0 */ #define INT_ABS(x) ((x) < 0 ? -(x) : (x)) #define LOG2_DEC_PORTION(b) fmodl(log2l(INT_ABS((b))), 1.l) #define OPT_INT_DIV_TEST(b) \