Skip to content
Snippets Groups Projects
  1. May 08, 2016
  2. Feb 03, 2016
    • Damien George's avatar
      py/mpz: Add commented-out mpz_pow3_inpl function, to compute (x**y)%z. · ff1a96ce
      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.
      ff1a96ce
    • Doug Currie's avatar
      py/mpz: Complete implementation of mpz_{and,or,xor} for negative args. · 2e2e15ce
      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.
      2e2e15ce
  3. Jan 08, 2016
  4. Nov 22, 2015
  5. Oct 01, 2015
  6. Apr 25, 2015
  7. Apr 22, 2015
  8. Apr 09, 2015
  9. Mar 12, 2015
  10. Mar 02, 2015
  11. Jan 27, 2015
  12. Jan 24, 2015
  13. Jan 20, 2015
  14. Jan 16, 2015
  15. Jan 09, 2015
  16. Jan 02, 2015
  17. Jan 01, 2015
  18. Dec 31, 2014
  19. Oct 30, 2014
    • stijn's avatar
      mpz: Fix 64bit msvc build · 0e557fac
      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.
      0e557fac
  20. Oct 03, 2014
  21. Sep 10, 2014
  22. Sep 06, 2014
    • Damien George's avatar
      py: Make mpz able to use 16 bits per digit; and 32 on 64-bit arch. · 9a21d2e0
      Damien George authored
      Previously, mpz was restricted to using at most 15 bits in each digit,
      where a digit was a uint16_t.
      
      With this patch, mpz can use all 16 bits in the uint16_t (improvement
      to mpn_div was required).  This gives small inprovements in speed and
      RAM usage.  It also yields savings in ROM code size because all of the
      digit masking operations become no-ops.
      
      Also, mpz can now use a uint32_t as the digit type, and hence use 32
      bits per digit.  This will give decent improvements in mpz speed on
      64-bit machines.
      
      Test for big integer division added.
      9a21d2e0
  23. Sep 05, 2014
  24. Aug 29, 2014
  25. Aug 07, 2014
  26. Jul 31, 2014
    • Damien George's avatar
      py: Improve handling of long-int overflow. · c9aa58e6
      Damien George authored
      This removes mpz_as_int, since that was a terrible function (it
      implemented saturating conversion).
      
      Use mpz_as_int_checked and mpz_as_uint_checked.  These now work
      correctly (they previously had wrong overflow checking, eg
      print(chr(10000000000000)) on 32-bit machine would incorrectly convert
      this large number to a small int).
      c9aa58e6
  27. Jul 24, 2014
  28. Jul 03, 2014
  29. Jun 21, 2014
  30. Jun 01, 2014
    • Damien George's avatar
      Rename bultins config variables to MICROPY_PY_BUILTINS_*. · fb510b3b
      Damien George authored
      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.
      fb510b3b
  31. May 29, 2014
  32. May 13, 2014
  33. May 12, 2014
Loading