- Apr 25, 2017
-
-
Damien George authored
-
Damien George authored
-
- Feb 16, 2017
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
- Feb 02, 2017
-
-
Nicko van Someren authored
Updated modbuiltin.c to add conditional support for 3-arg calls to pow() using MICROPY_PY_BUILTINS_POW3 config parameter. Added support in objint_mpz.c for for optimised implementation.
-
- Jan 21, 2017
-
-
Paul Sokolovsky authored
-
- Dec 28, 2016
-
-
Damien George authored
-
- Dec 13, 2016
-
-
Damien George authored
-
- Oct 31, 2016
-
-
Pavol Rusnak authored
-
- Oct 11, 2016
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
The check for division by zero is made by the caller of this function.
-
- May 09, 2016
-
-
Damien George authored
Previous to this patch bignum division and modulo would temporarily modify the RHS argument to the operation (eg x/y would modify y), but on return the RHS would be restored to its original value. This is not allowed because arguments to binary operations are const, and in particular might live in ROM. The modification was to normalise the arg (and then unnormalise before returning), and this patch makes it so the normalisation is done on the fly and the arg is now accessed as read-only. This change doesn't increase the order complexity of the operation, and actually reduces code size.
-
- May 08, 2016
-
-
Damien George authored
This patch consolidates the Python logic for division/modulo to one place within the bignum code.
-
Damien George authored
When DIG_SIZE=32, a uint32_t is used to store limbs, and no normalisation is needed because the MSB is already set, then there will be left and right shifts (in C) by 32 of a 32-bit variable, leading to undefined behaviour. This patch fixes this bug.
-
- Feb 03, 2016
-
-
Damien George authored
This function computes (x**y)%z in an efficient way. For large arguments this operation is otherwise not computable by doing x**y and then %z. It's currently not used, but is added in case it's useful one day.
-
Doug Currie authored
For these 3 bitwise operations there are now fast functions for positive-only arguments, and general functions for arbitrary sign arguments (the fast functions are the existing implementation). By default the fast functions are not used (to save space) and instead the general functions are used for all operations. Enable MICROPY_OPT_MPZ_BITWISE to use the fast functions for positive arguments.
-
- Jan 08, 2016
-
-
Damien George authored
-
- Nov 22, 2015
-
-
Paul Sokolovsky authored
-
- Oct 01, 2015
-
-
Damien George authored
-
Damien George authored
Python semantics are that rhs of shift must be non-negative, so there's no need to handle negative values in the underlying mpz implementation.
-
Damien George authored
-
- Apr 25, 2015
-
-
Damien George authored
-
Damien George authored
This gets int.to_bytes working for bignum, and also struct.pack with 'q' and 'Q' args on 32-bit machines. Addresses issue #1155.
-
- Apr 22, 2015
-
-
Damien George authored
-
- Apr 09, 2015
-
-
Damien George authored
-
- Mar 12, 2015
-
-
Damien George authored
-
- Mar 02, 2015
-
-
Damien George authored
-
- Jan 27, 2015
-
-
Damien George authored
-
- Jan 24, 2015
-
-
David Steinberg authored
-
David Steinberg authored
-
- Jan 20, 2015
-
-
Damien George authored
See issue #699.
-
- Jan 16, 2015
-
-
Damien George authored
See issue #699.
-
- Jan 09, 2015
-
-
Damien George authored
-
- Jan 02, 2015
-
-
Damien George authored
-
David Steinberg authored
-
- Jan 01, 2015
-
-
Damien George authored
Addresses issue #1022.
-
- Dec 31, 2014
-
-
Damien George authored
Addresses issue #1027.
-
- Oct 30, 2014
-
-
stijn authored
msvc does not treat 1L a 64bit integer hence all occurences of shifting it left or right result in undefined behaviour since the maximum allowed shift count for 32bit ints is 31. Forcing the correct type explicitely, stored in MPZ_LONG_1, solves this.
-