summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpz.c
Commit message (Collapse)AuthorAge
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | 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/.
* py: Add comment mpz function, and free memory used for string printing.Damien George2014-04-08
|
* Add string formatting support for longlong and mpz.Dave Hylands2014-04-07
|
* py: Handle small int power overflow correctly.Damien George2014-04-04
|
* py: More robust int conversion and overflow checking.Damien George2014-04-03
|
* objint_mpz: Quick&dirty implementation of bitwise operations.Paul Sokolovsky2014-03-23
| | | | | | | 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).
* py: Fix some bugs in mpz; add mpz_from_ll and mpz_set_from_ll.Damien George2014-03-12
| | | | A couple of bugs in mpn_shl, and overflow bug in mpz_set_from_int.
* py: Wrap mpz float functions in MICROPY_ENABLE_FLOAT.Damien George2014-03-08
|
* py: Implement bit-shift and not operations for mpz.Damien George2014-03-01
| | | | | | 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.
* py: Start to implement shl/shr for mpz. Fix return void.Damien George2014-02-26
|
* py: Fix mpn_sub, was increasing wrong source pointer.Damien George2014-02-24
| | | | Also change int -> machine_int_t where appropriate.
* Add arbitrary precision integer support.Damien George2014-02-22
Some functionality is still missing (eg and, or, bit shift), and some things are buggy (eg subtract).