mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Change the compiler's big integer library to use libTomMath
This now replaces Bill's crappy big int implementation
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#include "tommath_private.h"
|
||||
#ifdef 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
|
||||
Reference in New Issue
Block a user