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 */
14 /* compare based on magnitude */
19 /* compare the only digit of a to b */
21 return a
->dp
[0] > b
? MP_GT
: MP_LT
;