aleaxit / gmpy

General Multi-Precision arithmetic for Python 2.6+/3+ (GMP, MPIR, MPFR, MPC)
https://gmpy2.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
516 stars 87 forks source link

Misc fixes #452

Closed skirpichev closed 11 months ago

skirpichev commented 11 months ago

2e96fb6 Avoid computing _PyHASH_MODULUS in GMPy_MPQ_Hash_Slot() 324e284 Fix compiler warning 8a7b1ff Fix rst markup in docstrings (for emphasis) 12afc77 Use gmpy2.__package__ to get project name in sphinx b470a3b Set doctest_global_cleanup sphinx directive

codecov-commenter commented 11 months ago

Codecov Report

Merging #452 (874c95b) into master (21ccbf7) will not change coverage. The diff coverage is n/a.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##           master     #452   +/-   ##
=======================================
  Coverage   84.97%   84.97%           
=======================================
  Files          49       49           
  Lines       11738    11738           
  Branches     2206     2206           
=======================================
  Hits         9974     9974           
  Misses       1764     1764           
Files Coverage Δ
src/gmpy2_mpz_misc.c 100.00% <ø> (ø)

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

skirpichev commented 11 months ago

On Sat, Nov 04, 2023 at 02:13:46PM -0700, casevh wrote:

I need to test this on 64-bit Windows. mpz_set_si() accepts a long (32-bit) but _PyHASH_MODULUS is too large. At least that's my first reaction. I will respond later with the test results.

Yep, we should use mpz_set_ui().

skirpichev commented 11 months ago

Ok, first comment was removed. It seems we really want _PyHASH_BITS macro.

skirpichev commented 11 months ago

Change in _mpfr_hash() was reverted too, @casevh

casevh commented 11 months ago

Thanks for your patience in dealing with these subtle issues.

skirpichev commented 11 months ago

Hash-related patch was moved to #453