From: Mark Dickinson Date: Mon, 22 Feb 2010 15:40:28 +0000 (+0000) Subject: Clarify description of three-argument pow for Decimal types: the exponent of the... X-Git-Tag: v2.7a4~155 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f5be4e612c41c2b01cc0a71dec0f3f8ff0e6aee6;p=thirdparty%2FPython%2Fcpython.git Clarify description of three-argument pow for Decimal types: the exponent of the result is always 0. --- diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index b559ff5b78e7..d8ce673d4c87 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -1321,9 +1321,12 @@ In addition to the three supplied contexts, new contexts can be created with the - at least one of ``x`` or ``y`` must be nonzero - ``modulo`` must be nonzero and have at most 'precision' digits - The result of ``Context.power(x, y, modulo)`` is identical to the result - that would be obtained by computing ``(x**y) % modulo`` with unbounded - precision, but is computed more efficiently. It is always exact. + The value resulting from ``Context.power(x, y, modulo)`` is + equal to the value that would be obtained by computing ``(x**y) + % modulo`` with unbounded precision, but is computed more + efficiently. The exponent of the result is zero, regardless of + the exponents of ``x``, ``y`` and ``modulo``. The result is + always exact. .. versionchanged:: 2.6 ``y`` may now be nonintegral in ``x**y``.