summaryrefslogtreecommitdiffstats
path: root/generic/tclTomMath.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclTomMath.h')
-rw-r--r--generic/tclTomMath.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h
index fbf0d35..0541ad8 100644
--- a/generic/tclTomMath.h
+++ b/generic/tclTomMath.h
@@ -229,8 +229,8 @@ int mp_init_size(mp_int *a, int size);
/* ---> Basic Manipulations <--- */
#define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO)
-#define mp_iseven(a) ((((a)->used == 0) || (((a)->dp[0] & 1u) == 0u)) ? MP_YES : MP_NO)
-#define mp_isodd(a) ((((a)->used > 0) && (((a)->dp[0] & 1u) == 1u)) ? MP_YES : MP_NO)
+#define mp_iseven(a) (!mp_get_bit((a),0))
+#define mp_isodd(a) mp_get_bit((a),0)
#define mp_isneg(a) (((a)->sign != MP_ZPOS) ? MP_YES : MP_NO)
/* set to zero */