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 }
0 commit comments