Skip to content

Commit 501cd99

Browse files
[3.12] gh-110383: Clarify "non-integral" wording in pow() docs (GH-119688) (#120207)
(cherry picked from commit 6646a9d) Co-authored-by: Aditya Borikar <[email protected]>
1 parent 315611a commit 501cd99

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/functions.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,9 @@ are always available. They are listed here in alphabetical order.
14961496
returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative base of
14971497
type :class:`int` or :class:`float` and a non-integral exponent, a complex
14981498
result is delivered. For example, ``pow(-9, 0.5)`` returns a value close
1499-
to ``3j``.
1499+
to ``3j``. Whereas, for a negative base of type :class:`int` or :class:`float`
1500+
with an integral exponent, a float result is delivered. For example,
1501+
``pow(-9, 2.0)`` returns ``81.0``.
15001502

15011503
For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must
15021504
also be of integer type and *mod* must be nonzero. If *mod* is present and

0 commit comments

Comments
 (0)