diff options
author | Aditya Borikar <adityaborikar2@gmail.com> | 2024-06-07 09:44:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 09:44:42 (GMT) |
commit | 6646a9da26d12fc54263b22dd2916a2f710f1db7 (patch) | |
tree | 1180dec67661f07500911573063ea5241781d782 /Doc | |
parent | d5ba4fc9bc9b2d9eff2a90893e8d500e0c367237 (diff) | |
download | cpython-6646a9da26d12fc54263b22dd2916a2f710f1db7.zip cpython-6646a9da26d12fc54263b22dd2916a2f710f1db7.tar.gz cpython-6646a9da26d12fc54263b22dd2916a2f710f1db7.tar.bz2 |
gh-110383: Clarify "non-integral" wording in pow() docs (#119688)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/functions.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 4617767..1d82f92 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1561,7 +1561,9 @@ are always available. They are listed here in alphabetical order. returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative base of type :class:`int` or :class:`float` and a non-integral exponent, a complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value close - to ``3j``. + to ``3j``. Whereas, for a negative base of type :class:`int` or :class:`float` + with an integral exponent, a float result is delivered. For example, + ``pow(-9, 2.0)`` returns ``81.0``. For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must also be of integer type and *mod* must be nonzero. If *mod* is present and |