Add mp_isneg()
This function originally came from Heimdal's bundled copy of libtommath. Signed-off-by: Ken Dreyer <ktdreyer@ktdreyer.com>
This commit is contained in:
parent
31d69926b1
commit
ba15caa3be
@ -221,6 +221,7 @@ int mp_init_size(mp_int *a, int size);
|
|||||||
#define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO)
|
#define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO)
|
||||||
#define mp_iseven(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO)
|
#define mp_iseven(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO)
|
||||||
#define mp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO)
|
#define mp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO)
|
||||||
|
#define mp_isneg(a) (((a)->sign) ? MP_YES : MP_NO)
|
||||||
|
|
||||||
/* set to zero */
|
/* set to zero */
|
||||||
void mp_zero(mp_int *a);
|
void mp_zero(mp_int *a);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user