Skip to content

Commit 66a4a24

Browse files
committed
fix build of amalgamated library
Signed-off-by: Steffen Jaeckel <[email protected]>
1 parent 02cf798 commit 66a4a24

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

s_mp_fp_log_d.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
44
/* SPDX-License-Identifier: Unlicense */
55

6-
static mp_word s_mp_flog2_mp_word(mp_word value)
6+
static mp_word s_mp_flog2_mp_word_d(mp_word value)
77
{
88
mp_word r = 0u;
99
while ((value >>= 1) != 0u) {
@@ -13,12 +13,12 @@ static mp_word s_mp_flog2_mp_word(mp_word value)
1313
}
1414

1515
/* Fixed point bitwise logarithm base two of "x" with precision "p" */
16-
static mp_err s_mp_fp_log_fraction(mp_word x, int p, mp_word *c)
16+
static mp_err s_mp_fp_log_fraction_d(mp_word x, int p, mp_word *c)
1717
{
1818
mp_word b, L_out, L, a_bar, twoep;
1919
int i;
2020

21-
L = s_mp_flog2_mp_word(x);
21+
L = s_mp_flog2_mp_word_d(x);
2222

2323
if ((L + (mp_word)p) > MP_UPPER_LIMIT_FIXED_LOG) {
2424
return MP_VAL;
@@ -60,14 +60,14 @@ mp_err s_mp_fp_log_d(const mp_int *a, mp_word *c)
6060
if ((err = mp_div_2d(a, la - prec, &t, NULL)) != MP_OKAY) goto LTM_ERR;
6161
tmp = mp_get_u64(&t);
6262
/* Compute the low precision approximation for the fractional part */
63-
if ((err = s_mp_fp_log_fraction(tmp, prec, &la_word)) != MP_OKAY) goto LTM_ERR;
63+
if ((err = s_mp_fp_log_fraction_d(tmp, prec, &la_word)) != MP_OKAY) goto LTM_ERR;
6464
/* Compute the integer part and add it */
6565
tmp = ((mp_word)(la - prec))<<prec;
6666
la_word += tmp;
6767
mp_clear(&t);
6868
} else {
6969
tmp = mp_get_u64(a);
70-
if ((err = s_mp_fp_log_fraction(tmp, prec, &la_word)) != MP_OKAY) {
70+
if ((err = s_mp_fp_log_fraction_d(tmp, prec, &la_word)) != MP_OKAY) {
7171
return err;
7272
}
7373
}

tommath_class.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,8 +1091,8 @@
10911091
# define MP_DIV_2D_C
10921092
# define MP_GET_I64_C
10931093
# define MP_INIT_C
1094-
# define S_MP_FLOG2_MP_WORD_C
1095-
# define S_MP_FP_LOG_FRACTION_C
1094+
# define S_MP_FLOG2_MP_WORD_D_C
1095+
# define S_MP_FP_LOG_FRACTION_D_C
10961096
#endif
10971097

10981098
#if defined(S_MP_GET_BIT_C)

0 commit comments

Comments
 (0)