Skip to content
Snippets Groups Projects
  1. Apr 25, 2017
  2. Feb 16, 2017
  3. Feb 02, 2017
  4. Jan 21, 2017
  5. Dec 28, 2016
  6. Dec 13, 2016
  7. Oct 31, 2016
  8. Oct 11, 2016
  9. May 09, 2016
    • Damien George's avatar
      py/mpz: Fix mpn_div so that it doesn't modify memory of denominator. · 460b0863
      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.
      460b0863
  10. May 08, 2016
  11. 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
  12. Jan 08, 2016
  13. Nov 22, 2015
  14. Oct 01, 2015
  15. Apr 25, 2015
  16. Apr 22, 2015
  17. Apr 09, 2015
  18. Mar 12, 2015
  19. Mar 02, 2015
  20. Jan 27, 2015
  21. Jan 24, 2015
  22. Jan 20, 2015
  23. Jan 16, 2015
  24. Jan 09, 2015
  25. Jan 02, 2015
  26. Jan 01, 2015
  27. Dec 31, 2014
  28. 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
Loading