1 #include "tommath_private.h"
3 /* LibTomMath, multiple-precision integer library -- Tom St Denis */
4 /* SPDX-License-Identifier: Unlicense */
7 mp_err
mp_neg(const mp_int
*a
, mp_int
*b
)
11 if ((err
= mp_copy(a
, b
)) != MP_OKAY
) {
17 b
->sign
= (a
->sign
== MP_ZPOS
) ? MP_NEG
: MP_ZPOS
;