Artifact 1050f05ebbd3a92dd31f725f573a78e4e7c9cea08c3dcd2fb2d9e4562c5e86ab:
- File libtommath/bn_s_mp_log_2expt.c — part of check-in [75cd1c302b] at 2024-03-27 20:54:34 on branch libtommath-1.3 — Libtommath 1.3 (user: jan.nijtmans, size: 329) [annotate] [blame] [check-ins using] [more...]
#include "tommath_private.h" #ifdef BN_S_MP_LOG_2EXPT_C /* LibTomMath, multiple-precision integer library -- Tom St Denis */ /* SPDX-License-Identifier: Unlicense */ int s_mp_log_2expt(const mp_int *a, mp_digit base) { int y; for (y = 0; (base & 1) == 0; y++, base >>= 1) {} return (mp_count_bits(a) - 1) / y; } #endif