1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2024-11-15 05:45:55 +05:30

opt_int_div.h: fix the test in OPT_INT_DIV

This commit is contained in:
Intel A80486DX2-66 2024-03-09 17:16:46 +03:00
parent 9ead68332f
commit e8d0b5a091
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -36,7 +36,8 @@
/* */ \
/* formula: round(log_2(b) % 1, OPT_INT_DIV_TEST_PRECISION digits */ \
/* after point) == 0 */ \
(roundl(fmodl(log2l((b)), 1.l) * OPT_INT_DIV_ROUNDING) == 0.l) ? ( \
(roundl(fmodl(log2l(INT_ABS((b))), 1.l) * OPT_INT_DIV_ROUNDING) \
== 0.l) ? ( \
/* if only one of the numbers is negative, the result is */ \
/* negative */ \
INT_DIV_NEG_RESULT_SIGN(a, b) ? \