From 7898a3c1caebfb022fec1d74b88b8833a477b93a Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sun, 25 Feb 2024 01:07:22 +0300 Subject: [PATCH] C: opt_int_div.h: remove the unnecessary division after rounding --- c-programming/math/opt_int_div.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/c-programming/math/opt_int_div.h b/c-programming/math/opt_int_div.h index 10a83fc..3950600 100644 --- a/c-programming/math/opt_int_div.h +++ b/c-programming/math/opt_int_div.h @@ -34,8 +34,7 @@ /* */ \ /* 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) / \ - OPT_INT_DIV_ROUNDING == 0.l) ? ( \ + (roundl(fmodl(log2l((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) ? \