@@ -30,8 +30,9 @@ module scope, content and interfaces (returned values or accepted arguments).
3030
3131For example, the :external+py3.14:mod: `math ` module documentation says: "Except
3232when explicitly noted otherwise, all return values are floats." This is not
33- longer true: *None * of the functions listed in the "Number-theoretic
34- functions" [1 ]_ subsection of the documentation returns a float, but the
33+ longer true: *None * of the functions listed in the `Number-theoretic
34+ functions <https://docs.python.org/3.14/library/math.html#number-theoretic-functions> `_
35+ subsection of the documentation returns a float, but the
3536documentation doesn't say so. In the proposed module a similar sentence "All
3637return values are integers." could tell the truth once. In a similar way we
3738can simplify description of accepted arguments for both the
@@ -48,7 +49,7 @@ grouping related functions and IDEs suggesting helpful completions.
4849Specification
4950=============
5051
51- The PEP proposes moving the following integer-related functions [ 1 ]_ in a new
52+ The PEP proposes moving the following integer-related functions in a new
5253module, called ``imath ``:
5354
5455* :external+py3.14:func: `~math.comb `
@@ -114,18 +115,21 @@ like the GMP, the module scope should be limited. For example, no primality
114115testing and factorization.
115116
116117There are possible additions, among proposed in the initial discussion thread
117- (see also [5 ]_):
118+ (see also issue
119+ `python/cpython#81313 <https://github.com/python/cpython/issues/81313 >`_):
118120
119- * ``c_div() `` --- for integer ceiling divide, see [2 ]_, [3 ]_.
121+ * ``c_div() `` --- for integer ceiling divide, see
122+ `relevant discussion thread <https://discuss.python.org/t/91269 >`_.
120123* ``gcdext() `` --- to solve linear Diophantine equation in two variables (the
121124 :external+py3.14:class: `int ` implementation actually includes an extended
122125 Euclidean algorithm)
123126* ``isqrt_rem() `` --- to return both integer square root and a remainder (if
124127 integer isn't a perfect square)
125128* ``ilog() `` --- integer logarithm, :external+py3.14:func: `math.log `
126129 has a special handling for integer arguments. It's unique (with respect to other module
127- functions) and not documented so far, see [4 ]_
128- * ``fibonacci() ``.
130+ functions) and not documented so far, see issue
131+ `python/cpython#120950 <https://github.com/python/cpython/issues/120950 >`_.
132+ * ``fibonacci() ``.
129133
130134
131135Rejected ideas
@@ -146,18 +150,6 @@ splitting. Thanks to Neil Girdhar for substantial improvements of
146150the initial draft.
147151
148152
149- Footnotes
150- =========
151-
152- .. [1 ] Number-theoretic functions
153- (https://docs.python.org/3.14/library/math.html#number-theoretic-functions)
154- .. [2 ] Integer ceiling divide
155- (https://discuss.python.org/t/91269)
156- .. [3 ] https://gmpy2.readthedocs.io/en/stable/mpz.html#gmpy2.c_div
157- .. [4 ] https://github.com/python/cpython/issues/120950
158- .. [5 ] https://github.com/python/cpython/issues/81313
159-
160-
161153Copyright
162154=========
163155
0 commit comments