About the name, why not intmath ? 
And why not using sage ?
Or create a package on pypi ?

Le jeu. 12 juil. 2018 à 15:11, Serhiy Storchaka <storchaka@gmail.com> a écrit :
12.07.18 14:55, Serhiy Storchaka пише:
> What are your thoughts about adding a new imath module for integer
> mathematics? It could contain the following functions:

I forgot yet one useful function:

def divide_and_round(a, b):
     q, r = divmod(a, b)
     r *= 2
     greater_than_half = r > b if b > 0 else r < b
     if greater_than_half or r == b and q % 2 == 1:
         q += 1
     return q

(This is a copy of the implementation from datetime.py, there are yet
few implementations in Python and C in other files.)

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/