mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-12-27 05:40:17 +05:30
opt_int_div.h: use operator !=
instead of ^
This commit is contained in:
parent
8f402a5ac9
commit
df611cf964
@ -23,7 +23,7 @@
|
|||||||
#define INT_BIN_DIV(a, b) ((a) >> (uintmax_t) log2l((b)))
|
#define INT_BIN_DIV(a, b) ((a) >> (uintmax_t) log2l((b)))
|
||||||
#define INT_DIV_NEG_RESULT_SIGN(a, b) \
|
#define INT_DIV_NEG_RESULT_SIGN(a, b) \
|
||||||
/* the sign is negative only if one of the numbers is negative */ \
|
/* 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 INT_ABS(x) ((x) < 0 ? -(x) : (x))
|
||||||
#define LOG2_DEC_PORTION(b) fmodl(log2l(INT_ABS((b))), 1.l)
|
#define LOG2_DEC_PORTION(b) fmodl(log2l(INT_ABS((b))), 1.l)
|
||||||
#define OPT_INT_DIV_TEST(b) \
|
#define OPT_INT_DIV_TEST(b) \
|
||||||
|
Loading…
Reference in New Issue
Block a user