Skip to content

Commit ae03c4b

Browse files
committed
Disband "Open Issues"
1 parent 94ccb9f commit ae03c4b

File tree

1 file changed

+33
-36
lines changed

1 file changed

+33
-36
lines changed

peps/pep-0791.rst

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Currently the :external+py3.14:mod:`math` module code in the CPython is around
5151
comparable with the :external+py3.14:mod:`cmath` (1340LOC), which is *not* a
5252
simple wrapper to the ``libm``, as most functions in the
5353
:external+py3.14:mod:`math` module.
54+
5455
And this situation tends to get worse. When the module split `was first
5556
proposed
5657
<https://mail.python.org/archives/list/python-ideas@python.org/thread/YYJ5YJBJNCVXQWK5K3WSVNMPUSV56LOR/>`_,
@@ -59,6 +60,23 @@ there were only two integer-related functions:
5960
Now there are six and :external+py3.14:func:`~math.factorial` doesn't accept
6061
:class:`float`'s anymore.
6162

63+
Some possible additions, among those proposed in the initial discussion thread
64+
and issue
65+
`python/cpython#81313 <https://github.com/python/cpython/issues/81313>`_ are:
66+
67+
* ``ceil_div()`` --- for integer ceiling divide, see
68+
`relevant discussion thread <https://discuss.python.org/t/91269>`_.
69+
* ``gcdext()`` --- to solve linear `Diophantine equation <https://en.wikipedia.org/wiki/Diophantine_equation>`_ in two variables (the
70+
:external+py3.14:class:`int` implementation actually includes an extended
71+
Euclidean algorithm)
72+
* ``isqrt_rem()`` --- to return both an integer square root and a remainder (which is non-zero only if
73+
the integer isn't a perfect square)
74+
* ``ilog()`` --- integer logarithm, :external+py3.14:func:`math.log`
75+
has special handling for integer arguments. It's unique (with respect to other module
76+
functions) and not documented so far, see issue
77+
`python/cpython#120950 <https://github.com/python/cpython/issues/120950>`_.
78+
* ``fibonacci()`` --- `Fibonacci sequence <https://en.wikipedia.org/wiki/Fibonacci_sequence>`_.
79+
6280

6381
Rationale
6482
=========
@@ -98,9 +116,21 @@ Module functions will accept integers and objects that implement the
98116
object to an integer number. Suitable functions must be computed exactly,
99117
given sufficient time and memory.
100118

101-
Possible extensions for the new module and its scope are discussed in the
102-
`Open Issues <Open Issues_>`_ section. New functions are not part of this
103-
proposal.
119+
120+
Possible Extensions
121+
===================
122+
123+
New functions (like mentioned in `Motivation <Motivation_>`_ section) are not
124+
part of this proposal.
125+
126+
Though, we should mention that, unless we can just provide bindings to some
127+
well supported mathematical library like the GMP, the module scope should be
128+
limited. For example, no primality testing and factorization, as
129+
production-quality implementatons will require a decent mathematical background
130+
from contributors and belongs rather to specialized libraries.
131+
132+
When proposed function already exists in the :pypi:`gmpy2`, we should prefer a
133+
compatible interface for the stdlib.
104134

105135

106136
Backwards Compatibility
@@ -131,39 +161,6 @@ Reference Implementation
131161
`python/cpython#133909 <https://github.com/python/cpython/pull/133909>`_
132162

133163

134-
Open Issues
135-
===========
136-
137-
Module scope and possible extensions
138-
------------------------------------
139-
140-
Unless we can just provide bindings to some well supported mathematical library
141-
like the GMP, the module scope should be limited. For example, no primality
142-
testing and factorization, as production-quality implementatons will require a
143-
decent mathematical background from contributors and belongs rather to
144-
specialized libraries.
145-
146-
Some possible additions, among those proposed in the initial discussion thread
147-
(see also issue
148-
`python/cpython#81313 <https://github.com/python/cpython/issues/81313>`_):
149-
150-
* ``ceil_div()`` --- for integer ceiling divide, see
151-
`relevant discussion thread <https://discuss.python.org/t/91269>`_.
152-
* ``gcdext()`` --- to solve linear `Diophantine equation <https://en.wikipedia.org/wiki/Diophantine_equation>`_ in two variables (the
153-
:external+py3.14:class:`int` implementation actually includes an extended
154-
Euclidean algorithm)
155-
* ``isqrt_rem()`` --- to return both an integer square root and a remainder (which is non-zero only if
156-
the integer isn't a perfect square)
157-
* ``ilog()`` --- integer logarithm, :external+py3.14:func:`math.log`
158-
has special handling for integer arguments. It's unique (with respect to other module
159-
functions) and not documented so far, see issue
160-
`python/cpython#120950 <https://github.com/python/cpython/issues/120950>`_.
161-
* ``fibonacci()`` --- `Fibonacci sequence <https://en.wikipedia.org/wiki/Fibonacci_sequence>`_.
162-
163-
When proposed function already exists in the :pypi:`gmpy2`, we should prefer a
164-
compatible interface for the stdlib.
165-
166-
167164
Rejected ideas
168165
==============
169166

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy