Skip to content

Commit

Permalink
bpo-41205: Document Decimal power 0 to the 0 (pythonGH-21386)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Dickinson <[email protected]>
  • Loading branch information
2 people authored and arun-mani-j committed Jul 21, 2020
1 parent 9f559aa commit 70cb661
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Doc/library/decimal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70cb661

Please sign in to comment.