Kaydet (Commit) f5be4e61 authored tarafından Mark Dickinson's avatar Mark Dickinson

Clarify description of three-argument pow for Decimal types: the exponent of…

Clarify description of three-argument pow for Decimal types:  the exponent of the result is always 0.
üst dfd01489
...@@ -1321,9 +1321,12 @@ In addition to the three supplied contexts, new contexts can be created with the ...@@ -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 - at least one of ``x`` or ``y`` must be nonzero
- ``modulo`` must be nonzero and have at most 'precision' digits - ``modulo`` must be nonzero and have at most 'precision' digits
The result of ``Context.power(x, y, modulo)`` is identical to the result The value resulting from ``Context.power(x, y, modulo)`` is
that would be obtained by computing ``(x**y) % modulo`` with unbounded equal to the value that would be obtained by computing ``(x**y)
precision, but is computed more efficiently. It is always exact. % 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 .. versionchanged:: 2.6
``y`` may now be nonintegral in ``x**y``. ``y`` may now be nonintegral in ``x**y``.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment