86 Commits (69c25ea8653566ec97690b5121bd10b753c89426)

Author SHA1 Message Date
Angus Gratton 908ab1ceca py/objint: Fix int.to_bytes() buffer size checks. 11 months ago
Angus Gratton decf8e6a8b all: Remove the "STATIC" macro and just use "static" instead. 8 months ago
Damien George 2c139bbf4e py/mpz: Fix bugs with bitwise of -0 by ensuring all 0's are positive. 3 years ago
Jeff Epler 413f34cd8f all: Fix signed shifts and NULL access errors from -fsanitize=undefined. 3 years ago
Damien George 0a59938574 py/mpz: Fix overflow of borrow in mpn_div. 4 years ago
Damien George c891190c69 py: Rename WORD_MSBIT_HIGH to MP_OBJ_WORD_MSBIT_HIGH. 4 years ago
Damien George 1fef5662ab py/mpz: Do sign extension in mpz_as_bytes for negative values. 4 years ago
stijn 84fa3312cf all: Format code to add space after C++-style comment start. 5 years ago
Damien George 69661f3343 all: Reformat C and Python source code with tools/codeformat.py. 5 years ago
Damien George ce39c958ef py: Factor out definition of mp_float_union_t to one location. 5 years ago
Jeff Epler c4dafcef4f py/mpz: Avoid undefined behavior at integer overflow in mpz_hash. 7 years ago
Damien George f75c7ad1a9 py/mpz: In mpz_clone, remove unused check for NULL dig. 7 years ago
Damien George e784274430 py/mpz: In mpz_as_str_inpl, convert always-false checks to assertions. 7 years ago
Damien George 9766fddcdc py/mpz: Simplify handling of borrow and quo adjustment in mpn_div. 7 years ago
Damien George ae1be76d40 py/mpz: Apply a small code-size optimisation. 7 years ago
Damien George 374eaf5271 py/mpz: Fix pow3 function so it handles the case when 3rd arg is 1. 7 years ago
Alexander Steffen 55f33240f3 all: Use the name MicroPython consistently in comments 7 years ago
Damien George 04552ff71b py: Implement raising a big-int to a negative power. 7 years ago
Damien George 4d1fb6107f py/mpz: Make mpz_is_zero() an inline function. 7 years ago
Damien George f85fd79c6c py/mpz: In mpn_sub, use existing function to remove trailing zeros. 8 years ago
Damien George c7aa86ce6f py/mpz: Strip trailing zeros from mpz value when set from bytes. 8 years ago
Damien George 6ed77bedbd py/mpz: Change type of "base" args from mp_uint_t to unsigned int. 8 years ago
Damien George eb90edb5c0 py/mpz: Remove obsolete declaration of mpz_as_str_size. 8 years ago
Damien George dcdcc43dad py/mpz: Convert mp_uint_t to size_t where appropriate. 8 years ago
Nicko van Someren df0117c8ae py: Added optimised support for 3-argument calls to builtin.pow() 8 years ago
Paul Sokolovsky 1b42f5251f py/mpz: Implement mpz_set_from_bytes() as a foundation for int.from_bytes(). 8 years ago
Damien George 2d9440e2d1 py/mpz: Fix assertion in mpz_set_from_str which checks value of base. 8 years ago
Damien George e83f140463 py/mpz: Remove unreachable code in mpn_or_neg functions. 8 years ago
Pavol Rusnak 3679ee9b52 py: fix null pointer dereference in mpz.c, fix missing va_end in warning.c 8 years ago
Damien George 8bb7d958f1 py: Factor duplicated function to calculate size of formatted int. 8 years ago
Damien George df3e5d2b2f py/mpz: Use assert to verify mpz does not have a fixed digit buffer. 8 years ago
Damien George 48874942f0 py/mpz: In divmod, replace check for rhs!=0 with assert. 8 years ago
Damien George 460b086333 py/mpz: Fix mpn_div so that it doesn't modify memory of denominator. 9 years ago
Damien George 65402ab1ec py/mpz: Do Python style division/modulo within bignum divmod routine. 9 years ago
Damien George dc3faea040 py/mpz: Fix bug with overflowing C-shift in division routine. 9 years ago
Damien George ff1a96ce2c py/mpz: Add commented-out mpz_pow3_inpl function, to compute (x**y)%z. 9 years ago
Doug Currie 2e2e15cec2 py/mpz: Complete implementation of mpz_{and,or,xor} for negative args. 9 years ago
Damien George 2adf7ec3dd py/mpz: Fix conversion of float to mpz so it works on big endian archs. 9 years ago
Paul Sokolovsky b3be4710aa py/mpz: Normalize (remove leading zeros) xor operation result. 9 years ago
Damien George 2065373f67 py/mpz: Fix bignum anding of large negative with smaller positive int. 9 years ago
Damien George 2f4e8511cd py/mpz: Force rhs of mpz_shl_inpl/mpz_shr_inpl to be unsigned. 9 years ago
Damien George 4c02e54298 py/mpz: Raise NotImplError instead of failing assertion. 9 years ago
Damien George 9472907ae1 py: Fix handling of negative numbers in struct.pack of q/Q. 10 years ago
Damien George 271d18eb08 py: Support conversion of bignum to bytes. 10 years ago
Damien George f66ee4dfd7 py/mpz.c: Fix bug with shl not truncating zero digits correctly. 10 years ago
Damien George 4dea922610 py: Adjust some spaces in code style/format, purely for consistency. 10 years ago
Damien George 848dd0e762 py: Make some mpz functions static and remove unused ones. 10 years ago
Damien George a2e383820d py: Clean up and comment out unused functions in mpz. 10 years ago
Damien George a9dc9b8f6d py: Fix comparison of minus-zero long int. 10 years ago
David Steinberg 8d427b7ab7 py: Fix issue in mpz_set_from_float() when mp_int_t is larger than float 10 years ago