1 #include "tommath_private.h"
2 #ifdef MP_REDUCE_IS_2K_L_C
3 /* LibTomMath, multiple-precision integer library -- Tom St Denis */
4 /* SPDX-License-Identifier: Unlicense */
6 /* determines if reduce_2k_l can be used */
7 bool mp_reduce_is_2k_l(const mp_int
*a
)
11 } else if (a
->used
== 1) {
13 } else if (a
->used
> 1) {
14 /* if more than half of the digits are -1 we're sold */
16 for (iy
= ix
= 0; ix
< a
->used
; ix
++) {
17 if (a
->dp
[ix
] == MP_DIGIT_MAX
) {
21 return (iy
>= (a
->used
/2));