mirror of
https://github.com/python/cpython.git
synced 2024-12-04 07:15:09 +08:00
#15438: add a note to math.pow() that suggests using **/pow() for integers. Patch by Mark Dickinson.
This commit is contained in:
parent
ad17bc0bf9
commit
739d5497c0
@ -202,6 +202,10 @@ Power and logarithmic functions
|
||||
``x`` is negative, and ``y`` is not an integer then ``pow(x, y)``
|
||||
is undefined, and raises :exc:`ValueError`.
|
||||
|
||||
Unlike the built-in ``**`` operator, :func:`math.pow` converts both
|
||||
its arguments to type :class:`float`. Use ``**`` or the built-in
|
||||
:func:`pow` function for computing exact integer powers.
|
||||
|
||||
|
||||
.. function:: sqrt(x)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user