1 #include "tommath_private.h"
3 /* LibTomMath, multiple-precision integer library -- Tom St Denis */
4 /* SPDX-License-Identifier: Unlicense */
7 mp_ord mp_cmp_d(const mp_int *a, mp_digit b)
9 /* compare based on sign */
10 if (a->sign == MP_NEG) {
14 /* compare based on magnitude */
19 /* compare the only digit of a to b */
22 } else if (a->dp[0] < b) {