1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-12-26 02:29:50 +05:30

opt_int_div.h: use operator != instead of ^

This commit is contained in:
Intel A80486DX2-66 2024-03-24 13:25:43 +03:00
parent 8f402a5ac9
commit df611cf964
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -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) \