mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-01-10 17:32:05 +05:30
C: opt_int_div.h: remove the unnecessary division after rounding
This commit is contained in:
parent
19a84731d8
commit
7898a3c1ca
@ -34,8 +34,7 @@
|
|||||||
/* */ \
|
/* */ \
|
||||||
/* formula: round(log_2(b) % 1, OPT_INT_DIV_TEST_PRECISION digits */ \
|
/* formula: round(log_2(b) % 1, OPT_INT_DIV_TEST_PRECISION digits */ \
|
||||||
/* after point) == 0 */ \
|
/* after point) == 0 */ \
|
||||||
(roundl(fmodl(log2l((b)), 1.l) * OPT_INT_DIV_ROUNDING) / \
|
(roundl(fmodl(log2l((b)), 1.l) * OPT_INT_DIV_ROUNDING) == 0.l) ? ( \
|
||||||
OPT_INT_DIV_ROUNDING == 0.l) ? ( \
|
|
||||||
/* if only one of the numbers is negative, the result is */ \
|
/* if only one of the numbers is negative, the result is */ \
|
||||||
/* negative */ \
|
/* negative */ \
|
||||||
INT_DIV_NEG_RESULT_SIGN(a, b) ? \
|
INT_DIV_NEG_RESULT_SIGN(a, b) ? \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user