summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-07-19 11:10:47 (GMT)
committerGitHub <noreply@github.com>2020-07-19 11:10:47 (GMT)
commitdac8a3a15647d016842e2ae7284cefa27ce5e838 (patch)
treebd902d314f9598e4bbf49b11bd6e6f3e3c45bbc7
parent700cb6617545cdb8a9e16bb2e6efe90788a60d4d (diff)
downloadcpython-dac8a3a15647d016842e2ae7284cefa27ce5e838.zip
cpython-dac8a3a15647d016842e2ae7284cefa27ce5e838.tar.gz
cpython-dac8a3a15647d016842e2ae7284cefa27ce5e838.tar.bz2
bpo-41205: Document Decimal power 0 to the 0 (GH-21386)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com> (cherry picked from commit 10e466448f67850ed7bb2e2a4e7f017f2b050cad) Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
-rw-r--r--Doc/library/decimal.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index 8169bd3..38173f1 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -1357,6 +1357,9 @@ In addition to the three supplied contexts, new contexts can be created with the
The rounding mode of the context is used. Results are always correctly-rounded
in the Python version.
+ ``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if ``InvalidOperation``
+ is not trapped, then results in ``Decimal('NaN')``.
+
.. versionchanged:: 3.3
The C module computes :meth:`power` in terms of the correctly-rounded
:meth:`exp` and :meth:`ln` functions. The result is well-defined but