Tcl Source Code

Check-in [04444b286a]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bring in fix for mp_iseven().... almost missed that .... This should be given a dedicated test-case. Now everything taken from "gahr-ticket-e6f27aa56f" branch is handled.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | libtommath-1.0
Files: files | file ages | folders
SHA1: 04444b286ad83145407c38c5f26e81a75244e766
User & Date: jan.nijtmans 2016-11-17 11:03:39
Context
2016-11-17
11:38
Add test-case for mp_iseven(). If mp_iseven(0) ever returns 0, we will be warned that we are using t... check-in: d3f1169620 user: jan.nijtmans tags: libtommath-1.0
11:03
Bring in fix for mp_iseven().... almost missed that .... This should be given a dedicated test-cas... check-in: 04444b286a user: jan.nijtmans tags: libtommath-1.0
10:46
Merge trunk. Re-generate tclTomMath.h. Use faster exponentiation-function from libtommath 1.0 (in tc... check-in: 1e2d716ec7 user: jan.nijtmans tags: libtommath-1.0
2016-11-16
15:59
merge trunk Closed-Leaf check-in: ec44244e32 user: jan.nijtmans tags: gahr-ticket-e6f27aa56f
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to libtommath/tommath.h.

204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
int mp_grow(mp_int *a, int size);

/* init to a given number of digits */
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_isneg(a)  (((a)->sign != MP_ZPOS) ? MP_YES : MP_NO)

/* set to zero */
void mp_zero(mp_int *a);

/* set to a digit */






|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
int mp_grow(mp_int *a, int size);

/* init to a given number of digits */
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_isneg(a)  (((a)->sign != MP_ZPOS) ? MP_YES : MP_NO)

/* set to zero */
void mp_zero(mp_int *a);

/* set to a digit */