Damien George
fb510b3bf9
Rename bultins config variables to MICROPY_PY_BUILTINS_*.
This renames:
MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET
MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY
MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE
MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT
See issue #35 for discussion.
11 years ago
Damien George
f55cf10101
py: Implement bignum '&' with negatives on lhs and rhs.
Needs proper coverage testing. Doesn't implement -ve & -ve.
Addresses issue #611 .
11 years ago
Damien George
51fab28e94
py: Improve mpz_and function.
This should now have correct (and optimal) behaviour.
11 years ago
Damien George
561e425903
py: Fix bug in mpz_and function.
Addresses issue #610 .
11 years ago
stijn
01d6be4d51
Windows MSVC port
Extend the windows port so it compiles with the toolchain from Visual Studio 2013
11 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
11 years ago
Damien George
eec91057b8
py: Add comment mpz function, and free memory used for string printing.
11 years ago
Dave Hylands
c4029e5079
Add string formatting support for longlong and mpz.
11 years ago
Damien George
5bf565e353
py: Handle small int power overflow correctly.
11 years ago
Damien George
8270e3853d
py: More robust int conversion and overflow checking.
11 years ago
Paul Sokolovsky
57207b8818
objint_mpz: Quick&dirty implementation of bitwise operations.
Made solely to unbreak int-long.py test which in turn uncovered thinko
with implementation of inplace ops. On mpz level, bitwise ops implemented
only for same-sign numbers, and are not efficient (unconditional calling of
mpn_cmp() is apparently superfluous).
11 years ago
Damien George
bb4a43f35c
py: Fix some bugs in mpz; add mpz_from_ll and mpz_set_from_ll.
A couple of bugs in mpn_shl, and overflow bug in mpz_set_from_int.
11 years ago
Damien George
5260810d70
py: Wrap mpz float functions in MICROPY_ENABLE_FLOAT.
11 years ago
Damien George
06201ff3d6
py: Implement bit-shift and not operations for mpz.
Implement not, shl and shr in mpz library. Add function to create mpzs
on the stack, used for memory efficiency when rhs is a small int.
Factor out code to parse base-prefix of number into a dedicated function.
11 years ago
Damien George
c5ac2ac590
py: Start to implement shl/shr for mpz. Fix return void.
11 years ago
Damien George
aca141269e
py: Fix mpn_sub, was increasing wrong source pointer.
Also change int -> machine_int_t where appropriate.
11 years ago
Damien George
438c88dd2f
Add arbitrary precision integer support.
Some functionality is still missing (eg and, or, bit shift), and some
things are buggy (eg subtract).
11 years ago